﻿/**
 * 涓诲浘璁捐宸ヤ綔鍙?- 鍦嗘鼎鐜颁唬椋庢牸
 * Soft & Rounded Modern Design
 */

/* =========================================================
 * Layer 01 / Tokens & Reset
 * ========================================================= */

/* === 鍩虹鍙橀噺 === */
:root {
    /* 棰滆壊绯荤粺 - 鏇存煍鍜?*/
    --bg-primary: var(--sys-color-surface);
    --bg-secondary: var(--sys-color-surface-subtle);
    --bg-tertiary: var(--sys-color-surface-muted);
    --bg-canvas: var(--sys-color-page);

    --border-primary: var(--sys-color-border);
    --border-secondary: var(--sys-color-border-strong);
    --border-focus: var(--sys-color-focus);

    --text-primary: var(--sys-color-text);
    --text-secondary: var(--sys-color-text-secondary);
    --text-tertiary: var(--sys-color-text-tertiary);
    --text-inverse: var(--sys-color-text-inverse);

    /* 涓婚鑹?- 涓撲笟钃?*/
    --accent-primary: var(--sys-color-primary);
    --accent-secondary: var(--sys-color-primary-hover);
    --accent-light: var(--sys-color-primary-soft);
    --accent-gradient: linear-gradient(135deg, var(--sys-color-primary) 0%, #6f73ee 62%, var(--sys-color-accent) 100%);
    --accent-gradient-hover: linear-gradient(135deg, var(--sys-color-primary-hover) 0%, #5f62dd 62%, #7779e9 100%);

    /* 璇箟鑹?*/
    --success: var(--sys-color-success);
    --success-light: var(--sys-color-success-soft);
    --warning: var(--sys-color-warning);
    --danger: var(--sys-color-danger);

    /* 闃村奖绯荤粺 - 绮剧粏鍒嗙骇 */
    --shadow-xs: var(--sys-shadow-xs);
    --shadow-sm: var(--sys-shadow-sm);
    --shadow-md: var(--sys-shadow-sm);
    --shadow-lg: var(--sys-shadow-md);
    --shadow-xl: var(--sys-shadow-md);
    --shadow-2xl: var(--sys-shadow-dialog);
    --shadow-glow: var(--sys-shadow-sm);
    --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.04);

    /* 鍦嗚绯荤粺 */
    --radius-sm: var(--sys-radius-sm);
    --radius-md: var(--sys-radius-md);
    --radius-lg: var(--sys-radius-lg);
    --radius-xl: var(--sys-radius-xl);
    --radius-2xl: var(--sys-radius-2xl);
    --radius-full: var(--sys-radius-full);

    /* 闂磋窛绯荤粺 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* 杩囨浮鍔ㄧ敾 - 鏃堕暱绯荤粺 */
    --duration-instant: 0.1s;
    --duration-fast: 0.16s;
    --duration-normal: 0.22s;
    --duration-slow: 0.28s;
    --duration-slower: 0.5s;
    --duration-slowest: 0.7s;

    /* 缂撳姩鍑芥暟绯荤粺 */
    --ease-standard: var(--sys-ease-standard);
    --ease-decelerate: var(--sys-ease-out);
    --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-emphasis: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* 缁勫悎杩囨浮鍙橀噺 */
    --transition-instant: var(--duration-instant) var(--ease-standard);
    --transition-fast: var(--duration-fast) var(--ease-standard);
    --transition-normal: var(--duration-normal) var(--ease-standard);
    --transition-slow: var(--duration-slow) var(--ease-standard);
    --transition-slower: var(--duration-slower) var(--ease-standard);
    --transition-bounce: var(--duration-slower) var(--ease-bounce);
    --transition-enter: var(--duration-normal) var(--ease-decelerate);
    --transition-exit: var(--duration-fast) var(--ease-accelerate);
    --transition-emphasis: var(--duration-normal) var(--ease-emphasis);

    /* 灏哄 */
    --nav-height: 64px;
    --sidebar-width: 380px;
}

/* V10 compact AI decision report: deep reasoning stays behind the summary. */
.analysis-report-compact {
    display: grid;
    gap: 18px;
    color: #182230;
    font-size: 15px;
    line-height: 1.62;
}

.analysis-compact-hero,
.analysis-compact-section,
.analysis-compact-platform,
.analysis-compact-evidence,
.analysis-compact-prompts {
    border: 1px solid #e5eaf1;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(25, 40, 65, 0.055);
}

.analysis-compact-hero {
    position: relative;
    overflow: hidden;
    padding: 28px 30px;
    background:
        radial-gradient(circle at 92% 8%, rgba(49, 130, 246, 0.13), transparent 34%),
        linear-gradient(145deg, #fbfdff 0%, #f5f8fd 100%);
}

.analysis-compact-hero::after {
    content: '';
    position: absolute;
    inset: auto -50px -75px auto;
    width: 180px;
    height: 180px;
    border: 24px solid rgba(59, 130, 246, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.analysis-compact-hero-meta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.analysis-compact-hero-meta span,
.analysis-compact-hero-meta b,
.analysis-compact-hero-meta em {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
}

.analysis-compact-hero-meta span {
    color: #fff;
    background: #172033;
}

.analysis-compact-hero-meta b {
    color: #175cd3;
    background: #eaf2ff;
}

.analysis-compact-hero-meta em {
    color: #526175;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
}

.analysis-compact-hero h3 {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0;
    color: #111827;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.035em;
}

.analysis-compact-hero > p {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 12px 0 0;
    color: #475467;
    font-size: 16px;
    line-height: 1.7;
}

.analysis-compact-thumbnail-test {
    position: relative;
    z-index: 1;
    max-width: 760px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px 12px;
    margin-top: 15px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #dfe6ef;
    border-radius: 14px;
}

.analysis-compact-thumbnail-test > span {
    padding: 4px 8px;
    color: #fff;
    background: #344054;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.analysis-compact-decision-flow {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
}

.analysis-compact-decision-step {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.analysis-compact-decision-step small {
    width: auto;
    color: #667085;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}

.analysis-compact-decision-step strong {
    overflow: hidden;
    color: #175cd3;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analysis-compact-decision-step.is-choice strong { color: #087443; }

.analysis-compact-decision-flow > i {
    color: #98a2b3;
    font-size: 16px;
    font-style: normal;
}

.analysis-compact-thumbnail-test.is-split .analysis-compact-decision-flow > i { color: #f79009; }
.analysis-compact-thumbnail-test.is-no-choice .analysis-compact-decision-step.is-choice strong { color: #667085; }

.analysis-compact-thumbnail-test p {
    grid-column: 1 / -1;
}

.analysis-compact-thumbnail-test p {
    display: flex;
    gap: 5px;
    margin: 0;
    color: #475467;
    font-size: 14px;
}

.analysis-compact-thumbnail-test p b {
    color: #667085;
    white-space: nowrap;
}

.analysis-compact-thumbnail-test > small {
    width: 100%;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
}

.analysis-compact-thumbnail-test > .analysis-compact-unreadable { grid-column: 1 / -1; }

.analysis-compact-platform {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid #eadfbd;
    border-radius: 18px;
    background: linear-gradient(135deg, #fffdf8, #fffaf0);
    box-shadow: 0 8px 24px rgba(98, 74, 25, 0.045);
}

.analysis-compact-platform-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.analysis-compact-platform-head span,
.analysis-compact-platform-head em {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
}

.analysis-compact-platform-head span { color: #fff; background: #8a6420; }
.analysis-compact-platform-head strong { color: #342a18; font-size: 15px; }
.analysis-compact-platform-head em { color: #72551d; background: #f7eac7; }

.analysis-compact-platform > p,
.analysis-compact-platform > small {
    margin: 0;
    color: #64583f;
    font-size: 13px;
    line-height: 1.55;
}

.analysis-compact-platform dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.analysis-compact-platform dl > div {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(162, 126, 48, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.76);
}

.analysis-compact-platform dt { color: #8a6b2e; font-size: 11px; font-weight: 800; }
.analysis-compact-platform dd { margin: 4px 0 0; color: #342a18; font-size: 14px; font-weight: 760; overflow-wrap: anywhere; }
.analysis-compact-platform .is-recommended { border-color: rgba(23, 92, 211, 0.18); background: #f7faff; }
.analysis-compact-platform .is-recommended dt { color: #175cd3; }
.analysis-compact-platform .is-pending { border-color: rgba(180, 118, 18, 0.28); background: #fffaf0; }
.analysis-compact-platform .is-pending dt { color: #a15c08; }

.analysis-compact-platform-confirm {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid rgba(180, 118, 18, 0.2);
    border-radius: 12px;
    color: #69583a;
    background: rgba(255, 250, 240, 0.86);
    font-size: 13px;
    line-height: 1.55;
}

.analysis-compact-platform-confirm b { flex: 0 0 auto; color: #a15c08; }

.analysis-compact-platform-delivery {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border: 1px dashed rgba(23, 92, 211, 0.22);
    border-radius: 12px;
    color: #475467;
    background: rgba(247, 250, 255, 0.82);
    font-size: 13px;
    line-height: 1.55;
}

.analysis-compact-platform-delivery b { flex: 0 0 auto; color: #175cd3; }

.analysis-banner-reasons { display: grid; gap: 9px; padding-top: 2px; }
.analysis-banner-reasons h5 { margin: 0; color: #5f4a20; font-size: 13px; font-weight: 850; }
.analysis-banner-reasons > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.analysis-banner-reasons article { min-width: 0; padding: 12px 13px; border: 1px solid rgba(162, 126, 48, .18); border-radius: 13px; background: rgba(255, 255, 255, .88); }
.analysis-banner-reasons header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 9px; border-bottom: 1px solid rgba(162, 126, 48, .12); }
.analysis-banner-reasons header strong { color: #26344a; font-size: 17px; letter-spacing: .04em; }
.analysis-banner-reasons header span { padding: 3px 7px; border-radius: 999px; color: #7a5a1e; background: #f7eac7; font-size: 10px; font-weight: 800; }
.analysis-compact-platform .analysis-banner-reasons dl { display: grid; grid-template-columns: 1fr; gap: 0; margin: 7px 0 0; }
.analysis-compact-platform .analysis-banner-reasons dl > div { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 7px; padding: 5px 0; border: 0; background: none; }
.analysis-banner-reasons dt { color: #8a6b2e; font-size: 11px; font-weight: 800; }
.analysis-banner-reasons dd { margin: 0; color: #4f493d; font-size: 14px; font-weight: 500; line-height: 1.58; }

.analysis-compact-value-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.analysis-compact-value-grid article {
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid #e2e8f4;
    border-radius: 16px;
    background: linear-gradient(145deg, #fbfcff, #f6f8fd);
}

.analysis-compact-value-grid span {
    display: block;
    margin-bottom: 7px;
    color: #315fca;
    font-size: 12px;
    font-weight: 800;
}

.analysis-compact-value-grid p {
    margin: 0;
    color: #344054;
    font-size: 14px;
    line-height: 1.62;
}

.analysis-compact-winner-mark {
    position: absolute;
    z-index: 2;
    top: 24px;
    right: 26px;
    display: grid;
    justify-items: end;
    gap: 2px;
}

.analysis-compact-winner-mark span {
    color: #667085;
    font-size: 11px;
    font-weight: 700;
}

.analysis-compact-winner-mark strong {
    color: #175cd3;
    font-size: 24px;
    line-height: 1;
}

.analysis-compact-hero.has-winner h3,
.analysis-compact-hero.has-winner > p,
.analysis-compact-hero.has-winner .analysis-compact-thumbnail-test {
    max-width: calc(100% - 125px);
}

.analysis-compact-section {
    padding: 22px;
}

.analysis-compact-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.analysis-compact-heading span {
    color: #2f6fed;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.analysis-compact-heading h4 {
    margin: 0;
    color: #1d2939;
    font-size: 18px;
    font-weight: 750;
    line-height: 1.35;
}

.analysis-deep-diagnosis {
    background: linear-gradient(150deg, #ffffff 0%, #f8faff 100%);
}

.analysis-deep-root {
    display: grid;
    gap: 7px;
    margin-bottom: 13px;
    padding: 17px 19px;
    border: 1px solid rgba(194, 53, 53, 0.18);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 244, 242, 0.95), rgba(255, 250, 248, 0.9));
}

.analysis-deep-root span,
.analysis-deep-chain span {
    color: #b42318;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .04em;
}

.analysis-deep-root strong {
    color: #2f2630;
    font-size: 16px;
    font-weight: 760;
    line-height: 1.65;
}

.analysis-deep-axis {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 5px 13px;
    align-items: start;
    margin-bottom: 13px;
    padding: 14px 16px;
    border: 1px solid #d8e3f7;
    border-radius: 15px;
    background: #f5f8ff;
}

.analysis-deep-axis span { color: #175cd3; font-size: 13px; font-weight: 850; white-space: nowrap; }
.analysis-deep-axis p { margin: 0; color: #344054; font-size: 15px; line-height: 1.62; }
.analysis-deep-axis small { grid-column: 2; color: #667085; font-size: 13px; line-height: 1.55; }

.analysis-operator-brief { background: linear-gradient(150deg, #fff 0%, #f8fbff 100%); }

.analysis-product-grounding { display: grid; gap: 11px; padding: 16px 17px; border: 1px solid #cfe5db; border-radius: 18px; background: linear-gradient(145deg, #f7fcfa, #fbfefd); box-shadow: 0 8px 22px rgba(18, 90, 66, .04); }
.analysis-product-grounding > header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.analysis-product-grounding > header > div { display: grid; gap: 2px; }
.analysis-product-grounding > header span { color: #087653; font-size: 10px; font-weight: 850; letter-spacing: .05em; }
.analysis-product-grounding > header strong { color: #153c30; font-size: 17px; }
.analysis-product-grounding > header em { margin-left: auto; padding: 4px 9px; border-radius: 999px; color: #087653; background: #dff5ec; font-size: 10px; font-style: normal; font-weight: 850; }
.analysis-product-grounding > header small { color: #5d766e; font-size: 11px; }
.analysis-product-grounding-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.analysis-product-grounding-grid article { min-width: 0; display: grid; align-content: start; gap: 6px; padding: 13px 14px; border: 1px solid #deece7; border-radius: 13px; background: rgba(255,255,255,.88); }
.analysis-product-grounding-grid article > span { color: #087653; font-size: 11px; font-weight: 850; }
.analysis-product-grounding-grid article > strong { color: #243c35; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.analysis-product-grounding-grid article > p { margin: 0; color: #5a6d67; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.analysis-product-grounding details { color: #5f716b; font-size: 12px; }
.analysis-product-grounding summary { width: fit-content; color: #087653; cursor: pointer; font-weight: 760; }
.analysis-product-grounding ul { display: grid; gap: 4px; margin: 7px 0 0; padding-left: 19px; }
.analysis-product-grounding.is-conflicted { border-color: #efcfc8; background: #fff8f7; }
.analysis-product-grounding.is-conflicted > header em { color: #a83b30; background: #fde9e5; }
.analysis-identity-audit { display: grid; gap: 7px; padding: 14px 17px; border: 1px solid #dce5f1; border-radius: 17px; background: linear-gradient(135deg, #fbfdff, #f7faff); box-shadow: 0 7px 20px rgba(29, 43, 70, .035); }
.analysis-identity-audit > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 11px; }
.analysis-identity-audit > div > span { color: #175cd3; font-size: 12px; font-weight: 850; }
.analysis-identity-audit > div > strong { min-width: 0; color: #1f2d43; font-size: 16px; line-height: 1.45; }
.analysis-identity-audit > div > em { margin-left: auto; padding: 4px 8px; border-radius: 999px; color: #536277; background: #eaf1fb; font-size: 10px; font-style: normal; font-weight: 800; }
.analysis-identity-audit > p { margin: 0; color: #536277; font-size: 14px; line-height: 1.6; }
.analysis-identity-audit details { color: #627089; font-size: 13px; }
.analysis-identity-audit summary { width: fit-content; color: #175cd3; cursor: pointer; font-weight: 750; }
.analysis-identity-audit ul { display: grid; gap: 4px; margin: 7px 0 0; padding-left: 19px; }
.analysis-identity-audit.is-corrected { border-color: #efcfc8; background: linear-gradient(135deg, #fffafa, #fff7f5); }
.analysis-identity-audit.is-corrected > div > em { color: #a83b30; background: #fde9e5; }

.analysis-research-meta { overflow: hidden; border: 1px solid #cfe6dc; border-radius: 17px; background: linear-gradient(135deg, #f8fdfb, #fbfffd); box-shadow: 0 7px 20px rgba(18, 96, 69, .035); }
.analysis-research-meta > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; color: #096b4d; cursor: pointer; font-size: 14px; font-weight: 820; list-style: none; }
.analysis-research-meta > summary::-webkit-details-marker { display: none; }
.analysis-research-meta > summary small { color: #5d766e; font-size: 12px; font-weight: 550; }
.analysis-research-meta > div { display: grid; gap: 10px; padding: 0 16px 15px; border-top: 1px solid #e0eee8; }
.analysis-research-meta section { display: grid; gap: 5px; padding-top: 11px; }
.analysis-research-meta section b { color: #344054; font-size: 12px; }
.analysis-research-meta section p,
.analysis-research-boundary { margin: 0; color: #52645e; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.analysis-research-meta ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; }
.analysis-research-meta a { color: #175cd3; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.analysis-research-boundary { padding: 10px 12px; border-radius: 11px; background: #f1f8f5; }

.analysis-consumer-mind { position: relative; overflow: hidden; background: linear-gradient(145deg, #fffdf8 0%, #fff 44%, #f7fbff 100%); }
.analysis-mind-translation { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 9px; }
.analysis-mind-translation article { min-width: 0; display: grid; align-content: start; gap: 7px; padding: 15px 17px; border: 1px solid #eadfca; border-radius: 15px; background: #fffcf5; }
.analysis-mind-translation article.is-translation { border-color: #d9e4f5; background: #f8faff; }
.analysis-mind-translation article span { color: #9b6422; font-size: 12px; font-weight: 850; }
.analysis-mind-translation article.is-translation span { color: #175cd3; }
.analysis-mind-translation article strong { color: #292b32; font-size: 17px; line-height: 1.58; overflow-wrap: anywhere; }
.analysis-mind-translation article small { color: #667085; font-size: 12px; line-height: 1.52; }
.analysis-mind-translation > i { align-self: center; color: #a89b88; font-size: 15px; font-style: normal; }
.analysis-planted-minds,
.analysis-mind-followups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 8px; margin-top: 9px; }
.analysis-planted-minds article,
.analysis-mind-followups article { min-width: 0; display: grid; align-content: start; gap: 5px; padding: 11px 13px; border: 1px solid #e3e8f0; border-radius: 12px; background: rgba(255, 255, 255, .9); }
.analysis-planted-minds article > span { width: fit-content; padding: 3px 7px; border-radius: 999px; color: #8b5c21; background: #fff2d9; font-size: 10px; font-weight: 850; }
.analysis-planted-minds article > strong { color: #2f3a4d; font-size: 14px; line-height: 1.5; }
.analysis-planted-minds article > small,
.analysis-mind-followups article > span { color: #7c8798; font-size: 10px; line-height: 1.45; font-weight: 850; }
.analysis-planted-minds article > p,
.analysis-mind-followups article > p { margin: 0; color: #536176; font-size: 12px; line-height: 1.52; }
.analysis-mind-followups article.is-counter { border-color: #efddd4; background: #fffaf7; }
.analysis-mind-followups article.is-counter > span { color: #a14a32; }
.analysis-mind-gap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; margin-top: 9px; padding: 11px 13px; border-left: 3px solid #d99034; border-radius: 4px 12px 12px 4px; background: #fff9ef; }
.analysis-mind-gap span { color: #93601f; font-size: 11px; font-weight: 850; }
.analysis-mind-gap p { margin: 0; color: #53483a; font-size: 13px; line-height: 1.58; }
.analysis-inner-voices { margin-top: 9px; overflow: hidden; border: 1px solid #e2e7ef; border-radius: 14px; background: rgba(255, 255, 255, .84); }
.analysis-inner-voices > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; color: #3e4a5c; cursor: pointer; font-size: 13px; font-weight: 800; list-style: none; }
.analysis-inner-voices > summary::-webkit-details-marker { display: none; }
.analysis-inner-voices > summary small { color: #7d8898; font-size: 11px; font-weight: 500; }
.analysis-inner-voices > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 10px 10px; }
.analysis-inner-voices article { min-width: 0; display: grid; align-content: start; gap: 6px; padding: 12px 13px; border: 1px solid #e5e9ef; border-radius: 12px; background: #fff; }
.analysis-inner-voices article header { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.analysis-inner-voices article header span { color: #677488; font-size: 11px; font-weight: 800; }
.analysis-inner-voices article header em { padding: 3px 6px; border-radius: 999px; color: #7f5c25; background: #fff2dc; font-size: 10px; font-style: normal; font-weight: 850; }
.analysis-inner-voices article.is-click header em { color: #087653; background: #e8f7f1; }
.analysis-inner-voices article.is-skip header em { color: #b42318; background: #fdecea; }
.analysis-inner-voices article strong { color: #273347; font-size: 14px; line-height: 1.55; }
.analysis-inner-voices article p { margin: 0; color: #69768a; font-size: 12px; line-height: 1.52; }

.analysis-v33-reads { background: linear-gradient(145deg, #fff 0%, #fafcff 100%); }
.analysis-v33-reads > div:last-child { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 9px; }
.analysis-v33-reads article { min-width: 0; display: grid; align-content: start; gap: 8px; padding: 15px 16px; border: 1px solid #e0e6ef; border-radius: 15px; background: #fff; }
.analysis-v33-reads article.is-winner { border-color: #c8d8f5; background: #f8fbff; }
.analysis-v33-reads article header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.analysis-v33-reads article header span { color: #175cd3; font-size: 12px; font-weight: 850; }
.analysis-v33-reads article header em { padding: 3px 7px; border-radius: 999px; color: #087653; background: #e8f7f1; font-size: 10px; font-style: normal; font-weight: 850; }
.analysis-v33-reads article > strong { color: #26344a; font-size: 15px; line-height: 1.58; }
.analysis-v33-reads article > p { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 7px; margin: 0; color: #5b687b; font-size: 12px; line-height: 1.52; }
.analysis-v33-reads article > p b { font-size: 11px; }
.analysis-v33-reads .is-gain b { color: #087653; }
.analysis-v33-reads .is-loss b { color: #b42318; }

.analysis-click-route { background: linear-gradient(145deg, #f9fbff 0%, #fff 48%, #f7fbf9 100%); }
.analysis-decision-spine { display: flex; align-items: stretch; gap: 7px; margin-bottom: 12px; padding: 9px; border: 1px solid #dce5f3; border-radius: 16px; background: rgba(241, 246, 255, .78); }
.analysis-decision-spine article { min-width: 0; flex: 1 1 0; display: grid; align-content: start; gap: 5px; padding: 10px 11px; border-radius: 11px; background: rgba(255, 255, 255, .86); }
.analysis-decision-spine article span { color: #667085; font-size: 11px; font-weight: 850; letter-spacing: .04em; }
.analysis-decision-spine article strong { color: #25324a; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.analysis-decision-spine article:nth-of-type(4) strong { color: #174ea6; }
.analysis-decision-spine i { align-self: center; flex: 0 0 auto; color: #9aabc2; font-size: 12px; font-style: normal; }
.analysis-click-problem { display: grid; gap: 7px; margin-bottom: 11px; padding: 15px 17px; border: 1px solid #f0d2cc; border-radius: 15px; background: linear-gradient(135deg, #fff8f7, #fffdfc); }
.analysis-click-problem span { color: #b42318; font-size: 12px; font-weight: 850; }
.analysis-click-problem strong { color: #4a2520; font-size: 16px; line-height: 1.58; }
.analysis-click-mind { display: grid; gap: 7px; padding: 17px 19px; border: 1px solid #cfdcf4; border-radius: 16px; background: linear-gradient(135deg, #edf4ff, #f7faff); }
.analysis-click-mind > span,
.analysis-click-pair article > span,
.analysis-click-link > span { color: #175cd3; font-size: 12px; font-weight: 850; }
.analysis-click-mind > strong { color: #111827; font-size: 18px; line-height: 1.58; }
.analysis-click-mind > p { margin: 0; color: #475467; font-size: 14px; line-height: 1.6; }
.analysis-click-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.analysis-click-pair article { min-width: 0; display: grid; align-content: start; gap: 8px; padding: 18px 19px; border: 1px solid #dde5f0; border-radius: 17px; background: #fff; }
.analysis-click-pair article.is-headline { border-color: #d4e5da; background: #f9fdfb; }
.analysis-click-pair article.is-headline > span { color: #087653; }
.analysis-click-pair article > strong { color: #1d2939; font-size: 17px; line-height: 1.55; }
.analysis-click-pair article.is-headline > strong { color: #142b22; font-size: 23px; letter-spacing: -.02em; }
.analysis-click-pair p { margin: 0; color: #475467; font-size: 15px; line-height: 1.62; }
.analysis-click-pair small { display: block; color: #667085; font-size: 14px; line-height: 1.58; }
.analysis-click-pair p b,
.analysis-click-pair small b { display: block; margin-bottom: 3px; color: #175cd3; font-size: 11px; font-weight: 850; }
.analysis-click-link { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; margin-top: 12px; padding: 14px 16px; border: 1px dashed #d5deec; border-radius: 15px; background: #fbfcfe; }
.analysis-click-link p { margin: 0; color: #475467; font-size: 15px; line-height: 1.62; }
.analysis-click-reasoning { margin-top: 10px; overflow: hidden; border: 1px solid #e3e8f0; border-radius: 14px; background: rgba(255, 255, 255, .72); }
.analysis-click-reasoning > summary,
.analysis-operator-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; color: #344054; cursor: pointer; font-size: 14px; font-weight: 780; list-style: none; }
.analysis-click-reasoning > summary::-webkit-details-marker,
.analysis-operator-details > summary::-webkit-details-marker { display: none; }
.analysis-click-reasoning > summary small,
.analysis-operator-details > summary small { color: #7a8699; font-size: 12px; font-weight: 500; }
.analysis-click-reasoning dl { display: grid; margin: 0; padding: 0 15px 10px; }
.analysis-click-reasoning dl > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid #edf0f4; }
.analysis-click-reasoning dt { color: #667085; font-size: 12px; font-weight: 780; }
.analysis-click-reasoning dd { margin: 0; color: #475467; font-size: 14px; line-height: 1.58; }
.analysis-operator-details { overflow: hidden; border: 1px solid #e2e8f0; border-radius: 18px; background: #fff; box-shadow: 0 8px 22px rgba(29, 43, 70, .035); }
.analysis-operator-details > div { padding: 0 9px 9px; }
.analysis-operator-details .analysis-operator-brief { box-shadow: none; }

.analysis-ab-route { overflow: hidden; border: 1px solid #e1e6ee; border-radius: 19px; background: #fff; box-shadow: 0 8px 24px rgba(25, 40, 65, .035); }
.analysis-ab-route > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; color: #344054; cursor: pointer; font-size: 15px; font-weight: 780; list-style: none; }
.analysis-ab-route > summary::-webkit-details-marker { display: none; }
.analysis-ab-route > summary small { color: #667085; font-size: 12px; font-weight: 500; }
.analysis-ab-route > div { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(0, 1.3fr); gap: 13px; padding: 0 17px 17px; }
.analysis-ab-route article { display: grid; align-content: start; gap: 7px; padding: 15px 16px; border-radius: 15px; background: #f3f6fb; }
.analysis-ab-route article span { color: #667085; font-size: 12px; font-weight: 800; }
.analysis-ab-route article strong { color: #1d2939; font-size: 16px; line-height: 1.58; }
.analysis-ab-route > div > div { display: grid; gap: 7px; }
.analysis-ab-route p { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; margin: 0; color: #475467; font-size: 14px; line-height: 1.58; }
.analysis-ab-route p b { color: #667085; }
.analysis-operator-core { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.analysis-operator-core article { min-width: 0; display: grid; align-content: start; gap: 7px; padding: 16px 17px; border: 1px solid #dfe7f2; border-radius: 16px; background: #fff; }
.analysis-operator-core article > span,
.analysis-operator-copy > span { color: #175cd3; font-size: 12px; font-weight: 850; }
.analysis-operator-core article > strong { color: #1d2939; font-size: 15px; line-height: 1.62; }
.analysis-operator-core .is-waste { border-color: #f0d8d3; background: #fffafa; }
.analysis-operator-core .is-waste > span { color: #b42318; }
.analysis-operator-core .is-breakthrough { border-color: #cfe7dc; background: #f8fdfb; }
.analysis-operator-core .is-breakthrough > span { color: #087653; }

.analysis-operator-copy { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 5px 13px; margin-top: 11px; padding: 14px 16px; border: 1px solid #d9e3f4; border-radius: 15px; background: #f5f8ff; }
.analysis-operator-copy strong { color: #111827; font-size: 18px; line-height: 1.35; }
.analysis-operator-copy p { margin: 0; color: #475467; font-size: 15px; line-height: 1.6; }
.analysis-operator-copy small { grid-column: 2 / -1; color: #667085; font-size: 13px; line-height: 1.55; }

.analysis-operator-truths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 11px; margin-top: 11px; }
.analysis-operator-truths > article { min-width: 0; overflow: hidden; border: 1px solid #e1e7f0; border-radius: 16px; background: #fff; }
.analysis-operator-truths header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #e9edf3; background: #f7f9fc; }
.analysis-operator-truths header span { padding: 4px 8px; color: #175cd3; background: #eaf2ff; border-radius: 999px; font-size: 12px; font-weight: 850; }
.analysis-operator-truths header strong { color: #344054; font-size: 14px; }
.analysis-operator-truths dl { display: grid; margin: 0; padding: 3px 14px; }
.analysis-operator-truths dl > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf1f5; }
.analysis-operator-truths dl > div:last-child { border-bottom: 0; }
.analysis-operator-truths dt { color: #667085; font-size: 12px; font-weight: 800; }
.analysis-operator-truths dd { margin: 0; color: #344054; font-size: 15px; line-height: 1.58; }
.analysis-operator-truths .is-keep dt { color: #087653; }
.analysis-operator-truths .is-cut dt { color: #b42318; }

.analysis-deep-details { overflow: hidden; border: 1px solid #e5eaf1; border-radius: 20px; background: #fff; box-shadow: 0 8px 24px rgba(25, 40, 65, .045); }
.analysis-deep-details > summary { display: flex; justify-content: space-between; gap: 14px; padding: 16px 19px; color: #344054; cursor: pointer; font-size: 15px; font-weight: 780; list-style: none; }
.analysis-deep-details > summary::-webkit-details-marker { display: none; }
.analysis-deep-details > summary small { color: #667085; font-size: 12px; font-weight: 500; }
.analysis-deep-details > div { padding: 0 11px 11px; }
.analysis-deep-details .analysis-deep-diagnosis { box-shadow: none; }

.analysis-deep-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.analysis-deep-lens {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e1e7f0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
}

.analysis-deep-lens header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 15px;
    border-bottom: 1px solid #e9edf3;
    background: #f7f9fc;
}

.analysis-deep-lens header span {
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #175cd3;
    background: #eaf2ff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 850;
}

.analysis-deep-lens header strong { color: #1d2939; font-size: 15px; }
.analysis-deep-lens dl { display: grid; margin: 0; padding: 3px 15px; }
.analysis-deep-lens dl > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 11px; padding: 11px 0; border-bottom: 1px solid #edf1f5; }
.analysis-deep-lens dl > div:last-child { border-bottom: 0; }
.analysis-deep-lens dt { color: #667085; font-size: 13px; font-weight: 780; }
.analysis-deep-lens dd { margin: 0; color: #344054; font-size: 15px; line-height: 1.62; overflow-wrap: anywhere; }
.analysis-deep-lens .is-action dt { color: #087653; }
.analysis-deep-lens .is-action dd { color: #24493b; font-weight: 650; }

.analysis-deep-chain {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 13px;
    align-items: start;
    margin-top: 13px;
    padding: 15px 17px;
    border: 1px dashed #cfd9ea;
    border-radius: 15px;
    background: rgba(246, 249, 254, 0.9);
}

.analysis-deep-chain span { color: #175cd3; white-space: nowrap; }
.analysis-deep-chain p { margin: 0; color: #344054; font-size: 15px; line-height: 1.65; }

.analysis-compact-reasons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.analysis-compact-reasons article {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    padding: 17px;
    border: 1px solid #e6eaf0;
    border-radius: 17px;
    background: #fbfcfe;
}

.analysis-compact-reasons article > span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #175cd3;
    background: #eaf2ff;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
}

.analysis-compact-reasons strong,
.analysis-compact-actions strong {
    display: block;
    color: #1d2939;
    font-size: 15px;
    line-height: 1.45;
}

.analysis-compact-reasons p,
.analysis-compact-actions p {
    margin: 6px 0 0;
    color: #475467;
    font-size: 14px;
    line-height: 1.6;
}

.analysis-compact-reasons small {
    display: block;
    margin-top: 8px;
    color: #667085;
    font-size: 13px;
    line-height: 1.55;
}

.analysis-compact-snapshot,
.analysis-compact-candidate {
    overflow: hidden;
    border: 1px solid #e3e8ef;
    border-radius: 18px;
    background: #fff;
}

.analysis-compact-snapshot.is-single {
    max-width: 760px;
}

.analysis-compact-snapshot > header,
.analysis-compact-candidate-body > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 17px;
    background: #f8fafc;
    border-bottom: 1px solid #e7ebf0;
}

.analysis-compact-snapshot > header strong,
.analysis-compact-candidate-body > header strong {
    color: #1d2939;
    font-size: 16px;
}

.analysis-compact-snapshot > header span,
.analysis-compact-candidate-body > header span {
    flex: 0 0 auto;
    padding: 5px 9px;
    color: #175cd3;
    background: #eaf2ff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

.analysis-compact-snapshot dl,
.analysis-compact-candidate dl {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 5px 17px;
}

.analysis-compact-snapshot dl > div,
.analysis-compact-candidate dl > div {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #eef1f4;
}

.analysis-compact-snapshot dl > div:last-child,
.analysis-compact-candidate dl > div:last-child {
    border-bottom: 0;
}

.analysis-compact-snapshot dt,
.analysis-compact-candidate dt {
    font-size: 13px;
    font-weight: 750;
}

.analysis-compact-snapshot dd,
.analysis-compact-candidate dd {
    margin: 0;
    color: #344054;
    font-size: 15px;
    line-height: 1.6;
}

.analysis-compact-snapshot .is-good dt,
.analysis-compact-candidate .is-good dt { color: #07885d; }
.analysis-compact-snapshot .is-risk dt,
.analysis-compact-candidate .is-risk dt { color: #d92d20; }
.analysis-compact-snapshot .is-move dt,
.analysis-compact-candidate .is-move dt { color: #175cd3; }

.analysis-compact-execution {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.55fr);
    gap: 14px;
    align-items: stretch;
}

.soft-workbench .analysis-primary-thesis {
    grid-column: 1 / -1;
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid rgba(23, 92, 211, .18);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(23, 92, 211, .09), rgba(23, 92, 211, .025));
}

.soft-workbench .analysis-primary-thesis span,
.soft-workbench .analysis-message-chain article span {
    color: #175cd3;
    font-size: 12px;
    font-weight: 800;
}

.soft-workbench .analysis-primary-thesis strong {
    color: #172033;
    font-size: 16px;
    line-height: 1.55;
}

.soft-workbench .analysis-message-chain {
    grid-column: 1 / -1;
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.soft-workbench .analysis-message-chain article {
    flex: 1 1 0;
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 12px 13px;
    border: 1px solid #e3e8ef;
    border-radius: 13px;
    background: #fff;
}

.soft-workbench .analysis-message-chain article strong {
    color: #344054;
    font-size: 14px;
    line-height: 1.45;
}

.soft-workbench .analysis-message-chain > i {
    align-self: center;
    color: #98a2b3;
    font-size: 13px;
    font-style: normal;
}

.analysis-compact-actions {
    display: grid;
    gap: 10px;
}

.soft-workbench .analysis-report-compact:is(.is-v18, .is-v19, .is-v20, .is-v21, .is-v22) .analysis-compact-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analysis-compact-actions article {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 15px 16px;
    border: 1px solid #e3e8ef;
    border-radius: 15px;
    background: #fff;
}

.analysis-compact-actions article > span {
    min-height: 30px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #175cd3;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
}

.analysis-compact-actions article:nth-child(2) > span { background: #475467; }
.analysis-compact-actions article:nth-child(3) > span { background: #98a2b3; }

.analysis-compact-hook {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    color: #fff;
    background: linear-gradient(145deg, #172033, #273b60);
    border-radius: 17px;
}

.analysis-compact-hook > span {
    color: #b8c8e5;
    font-size: 12px;
    font-weight: 700;
}

.analysis-compact-hook strong {
    margin-top: 9px;
    color: #fff;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.analysis-compact-hook p {
    margin: 9px 0 0;
    color: #e6edf8;
    font-size: 15px;
}

.analysis-compact-hook small {
    margin-top: 12px;
    color: #b8c8e5;
    font-size: 13px;
    line-height: 1.55;
}

.analysis-compact-candidate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
    gap: 14px;
}

.analysis-compact-candidate.is-winner {
    border-color: rgba(47, 111, 237, 0.58);
    box-shadow: 0 12px 30px rgba(47, 111, 237, 0.12);
}

.analysis-compact-candidate-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 0;
    color: #667085;
    background: #f2f4f7;
    border: 0;
    border-bottom: 1px solid #e4e7ec;
}

.analysis-compact-candidate-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.analysis-compact-candidate-image span {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
    color: #fff;
    background: rgba(17, 24, 39, 0.72);
    border-radius: 999px;
    font-size: 11px;
}

.analysis-compact-candidate-body > header small {
    display: block;
    color: #667085;
    font-size: 11px;
}

.analysis-compact-candidate-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    padding: 4px 17px 16px;
}

.analysis-compact-candidate details {
    margin: 0 17px 16px;
    padding: 11px 12px;
    background: #f8fafc;
    border: 1px solid #e5e9ef;
    border-radius: 12px;
}

.analysis-compact-candidate details summary {
    cursor: pointer;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.analysis-compact-candidate details .ai-prompt-option {
    margin-top: 10px;
}

.analysis-compact-evidence,
.analysis-compact-prompts {
    overflow: hidden;
}

.analysis-compact-evidence > summary,
.analysis-compact-prompts > summary {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 20px;
    color: #344054;
    font-size: 15px;
    font-weight: 750;
    list-style: none;
}

.analysis-compact-evidence > summary::-webkit-details-marker,
.analysis-compact-prompts > summary::-webkit-details-marker { display: none; }

.analysis-compact-evidence > summary small,
.analysis-compact-prompts > summary small {
    color: #667085;
    font-size: 12px;
    font-weight: 500;
}

.analysis-compact-evidence > div,
.analysis-compact-prompts > div {
    padding: 0 20px 20px;
    border-top: 1px solid #edf0f4;
}

.analysis-compact-evidence .analysis-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 16px;
}

.analysis-compact-evidence .analysis-insight-label { font-size: 12px; }
.analysis-compact-evidence .analysis-insight-value { font-size: 14px; line-height: 1.6; }

.analysis-compact-question-list,
.analysis-compact-lenses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.analysis-compact-question-list b,
.analysis-compact-lenses b {
    width: 100%;
    color: #344054;
    font-size: 13px;
}

.analysis-compact-question-list span,
.analysis-compact-lenses span {
    padding: 6px 9px;
    color: #475467;
    background: #f2f4f7;
    border-radius: 9px;
    font-size: 13px;
}

.analysis-compact-prompts > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-top: 16px;
}

.analysis-compact-prompts .ai-prompt-option {
    min-height: 46px;
    margin: 0;
    font-size: 14px;
    text-align: center;
}

@media (max-width: 760px) {
    .analysis-compact-hero,
    .analysis-compact-section { padding: 20px; }
    .analysis-compact-hero h3 { font-size: 23px; }
    .analysis-compact-hero > p { font-size: 15px; }
    .analysis-compact-hero.has-winner h3,
    .analysis-compact-hero.has-winner > p,
    .analysis-compact-hero.has-winner .analysis-compact-thumbnail-test { max-width: 100%; }
    .analysis-compact-winner-mark { position: static; justify-items: start; margin-top: 14px; }
    .analysis-compact-reasons,
    .analysis-operator-core,
    .analysis-banner-reasons > div,
    .analysis-deep-grid,
    .analysis-compact-value-grid,
    .analysis-compact-execution,
    .analysis-compact-evidence .analysis-insight-grid,
    .analysis-compact-prompts > div { grid-template-columns: 1fr; }
    .analysis-compact-platform dl { grid-template-columns: 1fr; }
    .analysis-compact-platform-delivery { display: grid; gap: 4px; }
    .analysis-compact-thumbnail-test { grid-template-columns: 1fr; }
    .analysis-compact-thumbnail-test > span { justify-self: start; }
    .analysis-compact-decision-flow { width: 100%; }
    .analysis-compact-snapshot dl > div,
    .analysis-compact-candidate dl > div { grid-template-columns: 1fr; gap: 4px; }
    .soft-workbench .analysis-message-chain { flex-direction: column; }
    .soft-workbench .analysis-message-chain > i { display: none; }
    .soft-workbench .analysis-report-compact:is(.is-v18, .is-v19, .is-v20, .is-v21, .is-v22) .analysis-compact-actions { grid-template-columns: 1fr; }
    .analysis-deep-lens dl > div,
    .analysis-deep-chain,
    .analysis-deep-axis { grid-template-columns: 1fr; gap: 4px; }
    .analysis-deep-axis small { grid-column: 1; }
    .analysis-operator-copy { grid-template-columns: 1fr; gap: 5px; }
    .analysis-operator-copy small { grid-column: 1; }
    .analysis-operator-truths dl > div { grid-template-columns: 1fr; gap: 3px; }
    .analysis-click-pair,
    .analysis-ab-route > div { grid-template-columns: 1fr; }
    .analysis-mind-translation { grid-template-columns: 1fr; }
    .analysis-mind-translation > i { display: none; }
    .analysis-inner-voices > div { grid-template-columns: 1fr; }
    .analysis-mind-gap { grid-template-columns: 1fr; gap: 4px; }
    .analysis-decision-spine { flex-direction: column; gap: 6px; }
    .analysis-decision-spine i { display: none; }
    .analysis-click-link { grid-template-columns: 1fr; gap: 5px; }
    .analysis-click-reasoning dl > div { grid-template-columns: 1fr; gap: 3px; }
    .analysis-click-reasoning > summary,
    .analysis-operator-details > summary { align-items: flex-start; }
    .analysis-ab-route p { grid-template-columns: 1fr; gap: 2px; }
    .analysis-identity-audit > div > em { margin-left: 0; }
    .analysis-identity-audit { padding: 13px 14px; }
    .analysis-product-grounding { padding: 13px 14px; }
    .analysis-product-grounding > header em { margin-left: 0; }
    .analysis-product-grounding-grid { grid-template-columns: 1fr; }
    .analysis-research-meta > summary { align-items: flex-start; flex-direction: column; gap: 4px; padding: 12px 14px; }
    .analysis-research-meta > div { padding: 0 14px 14px; }
}

/* === 閲嶇疆涓庡熀纭€ === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-canvas);
    height: 100vh;
    overflow: hidden;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
    outline: none;
    box-shadow: var(--sys-focus-ring);
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

img {
    max-width: 100%;
    display: block;
}

/* === 椤堕儴瀵艰埅鏍?=== */
.top-nav {
    height: var(--nav-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 12px;
}

.brand-icon {
    font-size: 24px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.4px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: var(--sys-control-md);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: color var(--sys-motion-fast),
                background-color var(--sys-motion-fast),
                border-color var(--sys-motion-fast),
                box-shadow var(--sys-motion-fast),
                transform var(--sys-motion-fast);
    text-decoration: none;
}

.nav-btn:hover {
    background: var(--sys-color-surface-hover);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

.nav-btn:active {
    transform: translateY(1px);
}

.nav-btn.ai-active,
.nav-btn.batch-active,
.nav-btn.history-active,
.nav-btn.refine-active {
    color: var(--accent-primary);
    background: var(--sys-color-surface-selected);
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: var(--shadow-xs);
}

.nav-btn.icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-md);
}

.nav-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.nav-btn:hover svg {
    opacity: 1;
}

/* =========================================================
 * Layer 02 / Layout
 * ========================================================= */

/* === 涓诲竷灞€ === */
.app-layout {
    display: flex;
    height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
}

/* === 渚ц竟鏍?=== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width var(--transition-slow), transform var(--transition-slow);
    overflow: hidden;
    box-shadow: none;
}

.sidebar.collapsed {
    width: 0;
    border-right: none;
}

.sidebar-inner {
    width: var(--sidebar-width);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-section {
    padding: 20px 24px;
}

.sidebar-section:first-child {
    padding-top: 16px;
}

/* ---------------------------------------------------------
 * Module / Upload Workspace
 * --------------------------------------------------------- */

/* === 涓婁紶鍗＄墖 - 鍦嗘鼎璁捐 === */
.upload-card {
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    transition: border-color var(--sys-motion-fast), box-shadow var(--sys-motion-base);
}

.upload-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* === 涓婁紶妲戒綅 - 1:1姝ｆ柟褰€佸渾娑?=== */
.upload-slot {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px dashed var(--border-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--sys-motion-fast),
                border-color var(--sys-motion-fast),
                box-shadow var(--sys-motion-base),
                transform var(--sys-motion-fast);
    overflow: hidden;
    background: var(--bg-primary);
}

.upload-slot:hover {
    border-color: var(--accent-secondary);
    background: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.upload-slot:focus-visible {
    outline: none;
    box-shadow: var(--sys-focus-ring);
}

.upload-slot.primary {
    border-color: var(--accent-primary);
    border-style: dashed;
    background: var(--accent-light);
}

.upload-slot.primary:hover {
    background: var(--accent-light);
}

.slot-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-tertiary);
    transition: var(--transition-normal);
    padding: 20px;
    text-align: center;
}

.placeholder-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    opacity: 0.8;
    transition: var(--transition-normal);
}

.upload-slot:hover .placeholder-icon {
    opacity: 1;
    background: var(--accent-light);
    color: var(--accent-primary);
    transform: scale(1.05);
}

.upload-slot:hover .slot-placeholder {
    color: var(--accent-primary);
}

.placeholder-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.placeholder-hint {
    font-size: 12px;
    color: var(--text-tertiary);
}

.slot-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: var(--transition-normal);
    border-radius: calc(var(--radius-lg) - 2px);
}

.upload-slot.has-file .slot-preview {
    opacity: 1;
    transform: scale(1);
}

.upload-slot.has-file .slot-placeholder {
    display: none;
}

.upload-slot.has-file {
    border-style: solid;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.upload-slot.has-file:hover {
    transform: translateY(-1px);
    border-color: var(--sys-color-border-hover);
    box-shadow: var(--sys-shadow-card-hover);
}

.upload-clear-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
    color: #475467;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity var(--sys-motion-fast),
                transform var(--sys-motion-fast),
                color var(--sys-motion-fast),
                background-color var(--sys-motion-fast);
}

.upload-slot.has-file:hover .upload-clear-btn,
.upload-slot.has-file:focus-within .upload-clear-btn,
.upload-slot.has-file .upload-clear-btn:focus-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.upload-clear-btn:hover {
    color: var(--danger);
    background: var(--sys-color-danger-soft);
}

.upload-slot.is-processing::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 4;
    background: rgba(255, 255, 255, 0.76);
}

.upload-slot.is-processing::after {
    content: '';
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid rgba(37, 99, 235, 0.16);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
}

.upload-slot.upload-error {
    border-color: rgba(180, 35, 24, 0.55);
    background: var(--sys-color-danger-soft);
}

/* 鎷栨嫿鐘舵€?*/
.upload-slot.dragging {
    border-color: var(--accent-primary);
    border-style: solid;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    transform: scale(1.02);
    box-shadow: 0 0 0 4px var(--accent-light), var(--shadow-lg);
}

.upload-slot.dragging .placeholder-icon {
    transform: scale(1.1);
    background: var(--accent-light);
    color: var(--accent-primary);
}

.upload-slot.dragging .slot-placeholder {
    color: var(--accent-primary);
}

/* === 瑙掓爣鏍峰紡 - 宸︿笂瑙?=== */
.slot-label {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    z-index: 1;
}

.label-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.label-dot.product {
    background: var(--accent-primary);
}

.label-dot.reference {
    background: var(--success);
}

/* === AI鍒嗘瀽鎸夐挳 === */
.ai-analyze-btn {
    position: relative;
    width: 100%;
    margin-top: 16px;
    min-height: var(--sys-control-lg);
    padding: 9px 14px;
    background: var(--accent-primary);
    border-radius: var(--radius-sm);
    color: var(--text-inverse);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-normal);
    overflow: hidden;
}

.ai-analyze-btn:hover {
    background: var(--accent-secondary);
    box-shadow: var(--shadow-xs);
}

.ai-analyze-btn:active {
    transform: translateY(0);
}

.btn-glow {
    display: none;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* === 鎻愮ず璇嶅尯 === */
.prompt-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.prompt-select {
    width: 100%;
    min-height: var(--sys-control-lg);
    padding: 10px 12px;
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: border-color var(--sys-motion-fast),
                box-shadow var(--sys-motion-fast),
                background-color var(--sys-motion-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
}

.prompt-select:hover {
    border-color: var(--sys-color-border-hover);
}

.prompt-select:focus {
    border-color: var(--border-focus);
    box-shadow: var(--sys-focus-ring);
}

.prompt-input {
    width: 100%;
    min-height: 140px;
    padding: 12px;
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    transition: border-color var(--sys-motion-fast),
                box-shadow var(--sys-motion-fast),
                background-color var(--sys-motion-fast);
}

.prompt-input::placeholder {
    color: var(--text-tertiary);
}

.prompt-input:focus {
    border-color: var(--border-focus);
    box-shadow: var(--sys-focus-ring);
    background: var(--sys-color-surface-elevated);
}

/* === 鐢熸垚鎸夐挳鍖?=== */
.sidebar-footer {
    margin-top: auto;
    padding: 24px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-primary);
}

.generate-btn {
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    background: var(--accent-primary);
    border-radius: var(--radius-sm);
    color: var(--text-inverse);
    font-size: 15px;
    font-weight: 600;
    transition: background-color var(--sys-motion-fast),
                box-shadow var(--sys-motion-base),
                transform var(--sys-motion-fast),
                opacity var(--sys-motion-fast);
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    background: var(--accent-secondary);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.generate-btn:active {
    transform: translateY(0) scale(0.995);
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* === 鐢诲竷鍖哄煙 === */
.canvas-main {
    flex: 1;
    background: var(--bg-canvas);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* === AI绉戞妧椋庢牸绌虹姸鎬?=== */
.canvas-empty {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* 缃戞牸鑳屾櫙 */
.ai-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 70%);
}

/* 鎵弿绾挎晥鏋?*/
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
    animation: scan-move 4s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes scan-move {
    0%, 100% { top: 0; opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { top: 100%; opacity: 0; }
}

/* AI鏍稿績鍖哄煙 */
.ai-core {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 40px;
}

/* 鍏竟褰㈢幆 */
.hex-ring {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-ring svg {
    width: 100%;
    height: 100%;
}

.hex-outer {
    color: rgba(59, 130, 246, 0.2);
    animation: hex-rotate 30s linear infinite;
}

.hex-middle {
    color: rgba(99, 102, 241, 0.3);
    animation: hex-rotate 25s linear infinite reverse;
}

.hex-inner {
    color: rgba(59, 130, 246, 0.5);
    animation: hex-rotate 20s linear infinite;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
}

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

/* 鏁版嵁鐜?*/
.data-ring {
    position: absolute;
    inset: -20px;
    color: rgba(59, 130, 246, 0.4);
    animation: data-spin 15s linear infinite;
}

.data-ring svg {
    width: 100%;
    height: 100%;
}

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

/* 鑳介噺鑴夊啿 */
.energy-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.6);
    transform: translate(-50%, -50%);
    animation: pulse-expand 2s ease-out infinite;
}

.energy-pulse.delay-1 {
    animation-delay: 0.6s;
}

.energy-pulse.delay-2 {
    animation-delay: 1.2s;
}

@keyframes pulse-expand {
    0% {
        width: 60px;
        height: 60px;
        opacity: 0.8;
        border-color: rgba(59, 130, 246, 0.8);
    }
    100% {
        width: 180px;
        height: 180px;
        opacity: 0;
        border-color: rgba(59, 130, 246, 0);
    }
}

/* AI鏍稿績鍥炬爣 */
.ai-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 50%;
    color: #60a5fa;
    box-shadow:
        0 0 30px rgba(59, 130, 246, 0.3),
        inset 0 0 20px rgba(59, 130, 246, 0.1);
    animation: icon-glow 3s ease-in-out infinite;
}

.ai-icon svg {
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

@keyframes icon-glow {
    0%, 100% {
        box-shadow:
            0 0 30px rgba(59, 130, 246, 0.3),
            inset 0 0 20px rgba(59, 130, 246, 0.1);
    }
    50% {
        box-shadow:
            0 0 50px rgba(59, 130, 246, 0.5),
            inset 0 0 30px rgba(59, 130, 246, 0.2);
    }
}

/* 鏁版嵁鑺傜偣 */
.data-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
    animation: node-pulse 2s ease-in-out infinite;
}

.node-1 { top: 20%; left: 15%; animation-delay: 0s; }
.node-2 { top: 15%; right: 20%; animation-delay: 0.3s; }
.node-3 { top: 50%; right: 8%; animation-delay: 0.6s; }
.node-4 { bottom: 20%; right: 18%; animation-delay: 0.9s; }
.node-5 { bottom: 18%; left: 18%; animation-delay: 1.2s; }
.node-6 { top: 50%; left: 8%; animation-delay: 1.5s; }

@keyframes node-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

/* 杩炴帴绾?*/
.connection-lines {
    position: absolute;
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.conn-line {
    stroke: rgba(59, 130, 246, 0.2);
    stroke-width: 1;
    stroke-dasharray: 5 5;
    animation: line-flow 3s linear infinite;
}

.line-1 { animation-delay: 0s; }
.line-2 { animation-delay: 0.5s; }
.line-3 { animation-delay: 1s; }
.line-4 { animation-delay: 1.5s; }
.line-5 { animation-delay: 2s; }
.line-6 { animation-delay: 2.5s; }

@keyframes line-flow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -20; }
}

/* 鏍囬鍖哄煙 */
.ai-title-area {
    text-align: center;
    position: relative;
    z-index: 2;
}

.ai-title {
    font-size: 28px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 8px;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.title-bracket {
    color: #3b82f6;
    font-weight: 300;
}

.ai-subtitle {
    font-size: 11px;
    color: rgba(148, 163, 184, 0.8);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.status-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: status-blink 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

@keyframes status-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-text {
    font-size: 12px;
    color: #94a3b8;
    letter-spacing: 1px;
}

/* 纭繚鍐呭鍦ㄥ厜娴佷箣涓?*/
.canvas-empty,
.result-container,
.loading-overlay {
    position: relative;
    z-index: 1;
}
/* 注意: .canvas-toolbar 使用 position: absolute 居中定位，不在此处设置 */

/* 娉ㄦ剰: 鍥涘鏍肩粨鏋滄牱寮忓湪涓嬫柟 "鏀硅繘鐨勫洓瀹牸缁撴灉" 閮ㄥ垎瀹氫箟 */

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 760px;
    width: 100%;
    aspect-ratio: 1;
}

.result-item {
    position: relative;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.result-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.result-item.selected {
    box-shadow: 0 0 0 3px var(--accent-primary), var(--shadow-xl);
}

.result-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 鍥剧墖鍖呰鍣?*/
.item-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.item-overlay {
    display: none;
}

/* 搴忓彿瑙掓爣 - 绉戞妧椋?*/
.item-index {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md), 0 0 15px rgba(37, 99, 235, 0.1);
    z-index: 2;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

/* hover鎿嶄綔鎸夐挳 */
.item-actions {
    position: absolute;
    bottom: 14px;
    right: 14px;
    display: flex;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition-normal);
    z-index: 2;
}

.result-item:hover .item-actions {
    opacity: 1;
    transform: translateY(0);
}

.result-item .action-btn {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.result-item .action-btn:hover {
    background: var(--bg-primary);
    color: var(--accent-primary);
    transform: scale(1.1);
}

/* ---------------------------------------------------------
 * Module / Refine Workspace
 * --------------------------------------------------------- */

/* === 寰皟妯″紡瑕嗙洊灞傦紙鍏ㄦ柊璁捐锛?=== */
.refine-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.refine-overlay.active {
    opacity: 1;
    visibility: visible;
}

.refine-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 680px;
    width: 100%;
    padding: 32px;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.refine-overlay.active .refine-container {
    transform: scale(1) translateY(0);
}

/* 鍏抽棴鎸夐挳 */
.refine-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.refine-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

/* 涓诲浘灞曠ず */
.refine-main-image {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.refine-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 缂╃暐鍥鹃€夋嫨鍖?*/
.refine-thumbnails {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.refine-thumb-item {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    opacity: 0.6;
    transition: all 0.3s ease;
    position: relative;
}

.refine-thumb-item:hover {
    opacity: 0.9;
    transform: translateY(-4px);
}

.refine-thumb-item.active {
    border-color: var(--accent-primary);
    opacity: 1;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.refine-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.refine-thumb-item .thumb-num {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

/* 寰皟杈撳叆鍗＄墖 */
.refine-input-card {
    width: 100%;
    max-width: 560px;
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.input-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.input-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.input-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.input-wrapper input {
    flex: 1;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: 16px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

.refine-send-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #1d4ed8 100%);
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.refine-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.refine-send-btn:active {
    transform: translateY(0);
}

.input-tips {
    display: flex;
    gap: 16px;
}

.tip-item {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 鍝嶅簲寮?*/
@media (max-width: 768px) {
    .refine-container {
        padding: 16px;
        gap: 16px;
    }

    .refine-main-image {
        max-width: 320px;
        border-radius: 16px;
    }

    .refine-thumb-item {
        width: 56px;
        height: 56px;
        border-radius: 10px;
    }

    .refine-input-card {
        padding: 16px;
        border-radius: 16px;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .refine-send-btn {
        justify-content: center;
    }
}

/* === 寰皟妯″紡瀹屾暣鐢诲竷缂栬緫鍣?=== */

/* 缂栬緫鍣ㄤ笁鏍忓竷灞€ */
.refine-editor-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 宸︿晶宸ュ叿鏍?*/
.refine-sidebar {
    width: 64px;
    min-width: 64px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    padding: 16px 8px;
    gap: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-tools {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-tool-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-tool-btn.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.sidebar-tool-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 8px 4px;
}

/* 绗斿埛澶у皬闈㈡澘 */
.brush-size-panel {
    margin-top: auto;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.brush-size-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brush-size-panel input[type="range"] {
    width: 100%;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    writing-mode: vertical-lr;
    direction: rtl;
    transform: rotate(180deg);
    height: 80px;
    width: 4px;
}

.brush-size-panel input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.brush-size-panel input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
}

.brush-size-value {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    min-width: 24px;
    text-align: center;
}

/* 涓荤敾甯冨尯鍩?*/
.refine-canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #1a1a2e;
    overflow: hidden;
}

/* 椤堕儴HUD淇℃伅鏍?*/
.refine-hud {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none;
}

.refine-hud > * {
    pointer-events: auto;
}

.hud-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    font-size: 12px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    color: rgba(255, 255, 255, 0.8);
}

.hud-sep {
    color: rgba(255, 255, 255, 0.3);
}

.hud-actions {
    display: flex;
    gap: 8px;
}

.hud-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hud-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.hud-hint {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* 鐢诲竷瀹瑰櫒 */
.refine-canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: crosshair;
}

.refine-canvas-container canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* 鍏抽棴鎸夐挳锛堢敾甯冨尯鍩熷唴锛?- 鐧借壊涓婚 */
.refine-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 60;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.refine-close-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
    transform: scale(1.1);
}

/* 鍙充晶闈㈡澘 */
.refine-right-panel {
    width: 320px;
    min-width: 320px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
}

/* 缂╃暐鍥鹃€夋嫨鍖?- 鐧借壊涓婚 */
.refine-thumbnails-section {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.refine-thumbnails-section .section-title,
.refine-input-section .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.refine-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.refine-thumb-item {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.refine-thumb-item:hover {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.refine-thumb-item.active {
    border-color: var(--accent-primary);
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.refine-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.refine-thumb-item .thumb-num {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

/* 寰皟杈撳叆鍖?- 鐧借壊涓婚 */
.refine-input-section {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-top: 1px solid #e2e8f0;
}

.refine-textarea {
    min-height: 90px;
    max-height: 120px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #1e293b;
    resize: none;
    transition: all 0.2s ease;
}

.refine-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.refine-textarea::placeholder {
    color: #94a3b8;
}

.refine-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    margin-top: 12px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refine-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.refine-send-btn:active {
    transform: translateY(0);
}

/* 蹇嵎寤鸿 - 鐧借壊涓婚 */
.quick-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.suggestion-chip {
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-chip:hover {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

/* === 鍖哄煙鍒楄〃鏍峰紡 - 鐧借壊涓婚 === */
.refine-regions-section {
    flex: 1;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    overflow-y: auto;
    min-height: 0;
}

.refine-regions-section .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.refine-regions-section .section-title svg {
    color: var(--accent-primary);
}

.regions-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--accent-primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    margin-left: auto;
}

.regions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.region-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    transition: all 0.2s ease;
}

.region-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.region-item.active {
    border-color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.region-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.region-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--accent-primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
}

.region-coords {
    font-size: 11px;
    color: #94a3b8;
    font-family: 'Monaco', 'Consolas', monospace;
}

.region-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #e2e8f0;
    border-radius: 5px;
    color: #64748b;
}

.region-delete {
    margin-left: auto;
    padding: 4px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.region-delete:hover {
    color: #dc2626;
    background: #fef2f2;
}

.region-input {
    width: 100%;
    padding: 8px 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    color: #1e293b;
    resize: none;
    min-height: 50px;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.region-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.region-input::placeholder {
    color: #94a3b8;
}

.regions-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: #eff6ff;
    border-radius: 8px;
    font-size: 12px;
    color: #64748b;
}

.regions-tip svg {
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* === 鍖哄煙缂栬緫寮规 - 鐢诲竷浣嶇疆娴姩 === */
.region-edit-popup {
    position: absolute;
    z-index: 100;
    min-width: 280px;
    max-width: 280px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.08);
    animation: popup-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center top;
}

@keyframes popup-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-arrow {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: white;
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
    transform: translateX(-50%) rotate(45deg);
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.popup-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--accent-gradient);
    color: white;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.popup-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.popup-close {
    padding: 6px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

.popup-content {
    padding: 12px 16px 16px;
}

.popup-textarea {
    width: 100%;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    color: #1e293b;
    resize: none;
    min-height: 80px;
    line-height: 1.5;
    transition: all 0.2s ease;
    font-family: inherit;
}

.popup-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.popup-textarea::placeholder {
    color: #94a3b8;
}

.popup-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.popup-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-btn.primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.popup-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.popup-btn.secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.popup-btn.secondary:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

/* === 寰皟鐢诲竷瀹瑰櫒浼樺寲 === */
.refine-canvas-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    overflow: hidden;
}

/* 鐢诲竷缃戞牸鑳屾櫙 */
.refine-canvas-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.3) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* === 寰皟缂栬緫鍣ㄦ暣浣撳竷灞€浼樺寲 - 鐧借壊涓婚 === */
.refine-editor-layout {
    display: flex;
    width: 100%;
    height: 100%;
    background: #f8fafc;
}

/* 宸︿晶宸ュ叿鏍忎紭鍖?- 鐧借壊涓婚 */
.refine-sidebar {
    width: 68px;
    min-width: 68px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 16px 10px;
    gap: 6px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.03);
}

.sidebar-tools {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-tool-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-tool-btn:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0;
}

.sidebar-tool-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sidebar-tool-btn.danger:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.sidebar-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 4px;
}

/* 绗斿埛澶у皬闈㈡澘浼樺寲 - 鐧借壊涓婚 */
.brush-size-panel {
    margin-top: auto;
    padding: 12px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.brush-size-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brush-size-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-primary);
}

/* 绗斿埛婊戝潡鏍峰紡 - 鐧借壊涓婚 */
.brush-size-panel input[type="range"] {
    width: 4px;
    height: 80px;
    appearance: none;
    -webkit-appearance: none;
    background: #e2e8f0;
    border-radius: 2px;
    outline: none;
    writing-mode: vertical-lr;
    direction: rtl;
    transform: rotate(180deg);
}

.brush-size-panel input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.brush-size-panel input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
}

/* 鍙充晶闈㈡澘浼樺寲 - 鐧借壊涓婚 */
.refine-right-panel {
    width: 340px;
    min-width: 340px;
    background: white;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.03);
}

/* HUD 淇℃伅鏍忎紭鍖?- 閫忔槑涓婚 */
.refine-hud {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    z-index: 50;
    transition: all 0.2s ease;
}

.refine-hud:hover {
    background: rgba(0, 0, 0, 0.6);
}

.refine-hud.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-20px);
}

.hud-close {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.refine-hud:hover .hud-close {
    opacity: 1;
}

.hud-close:hover {
    background: rgba(239, 68, 68, 0.8);
    color: white;
}

.hud-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Monaco', 'Consolas', monospace;
}

.hud-sep {
    color: rgba(255, 255, 255, 0.3);
}

.hud-actions {
    display: flex;
    gap: 8px;
}

.hud-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hud-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.hud-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* 鍝嶅簲寮忚皟鏁?- 缂栬緫鍣ㄥ竷灞€ */
@media (max-width: 1024px) {
    .refine-right-panel {
        width: 280px;
        min-width: 280px;
    }

    .refine-thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .refine-editor-layout {
        flex-direction: column;
    }

    .refine-sidebar {
        width: 100%;
        min-width: auto;
        height: 64px;
        flex-direction: row;
        padding: 8px 16px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .sidebar-tools {
        flex-direction: row;
    }

    .brush-size-panel {
        margin-top: 0;
        margin-left: auto;
        flex-direction: row;
        padding: 8px 12px;
    }

    .brush-size-panel input[type="range"] {
        writing-mode: horizontal-tb;
        direction: ltr;
        transform: none;
        width: 60px;
        height: 4px;
    }

    .refine-right-panel {
        width: 100%;
        min-width: auto;
        max-height: 40vh;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .refine-thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }

    .hud-hint {
        display: none;
    }

    .refine-hud {
        top: 16px;
        max-width: calc(100vw - 136px);
        gap: 6px;
        padding: 6px 9px;
        border-radius: 12px;
    }

    .hud-info {
        gap: 4px;
        font-size: 11px;
        white-space: nowrap;
    }

    #hudCoords,
    #hudCoords + .hud-sep,
    #hudRectSep,
    #hudRect {
        display: none !important;
    }

    .hud-actions {
        gap: 5px;
    }

    .hud-btn {
        min-height: 32px;
        padding: 5px 8px;
        font-size: 10px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .hud-close {
        opacity: 1;
    }
}

/* 鏃х殑缁樺浘宸ュ叿鏍忔牱寮忥紙淇濈暀鍏煎鎬э級 */
.refine-tools-bar {
    position: absolute;
    bottom: -64px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.refine-tools-bar .tools-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.refine-tools-bar .tool-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.refine-tools-bar .tool-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.refine-tools-bar .tool-btn.active {
    background: var(--accent-primary);
    color: white;
}

.refine-tools-bar .tool-divider {
    width: 1px;
    height: 24px;
    background: var(--border-primary);
    margin: 0 4px;
}

/* 绗斿埛澶у皬鎺у埗 */
.brush-size-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    cursor: default;
}

.brush-size-control .size-label {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.brush-size-control input[type="range"] {
    width: 80px;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--border-primary);
    border-radius: 2px;
    outline: none;
}

.brush-size-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.brush-size-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.brush-size-control .size-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 24px;
    text-align: center;
}

/* 鍝嶅簲寮忚皟鏁?- 缁樺浘宸ュ叿鏍?*/
@media (max-width: 768px) {
    .refine-tools-bar {
        bottom: -70px;
        padding: 8px 12px;
        gap: 8px;
    }

    .refine-tools-bar .tool-btn {
        width: 36px;
        height: 36px;
    }

    .brush-size-control input[type="range"] {
        width: 60px;
    }
}

/* 鏃х殑搴曢儴寰皟闈㈡澘宸茬Щ闄わ紝浣跨敤鏂扮殑 .refine-overlay 鍏ㄥ睆瑕嗙洊灞?*/

/* === 寮圭獥閫氱敤閬僵 === */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* =========================================================
 * Layer 03 / Components
 * ========================================================= */

/* === AI鍒嗘瀽寮圭獥 V2 - 涓撲笟绠€娲侀锛堝渾娑︿紭鍖栫増锛?=== */
.analysis-dialog-v2 {
    width: 920px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 48px);
    background: linear-gradient(180deg, rgba(255,255,255,0.992), rgba(248,250,252,0.975));
    border-radius: 30px;
    box-shadow: 0 44px 110px rgba(15, 23, 42, 0.18), 0 16px 38px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255,255,255,0.95);
    overflow: hidden;
    animation: dialog-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dialog-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 澶撮儴 */
.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 28px 32px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.045);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.90));
}

.header-info h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 6px 0;
}

.header-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.close-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
    transition: all 0.22s ease;
    flex-shrink: 0;
}

.close-btn:hover {
    background: rgba(248,250,252,0.98);
    color: #334155;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.close-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08), 0 10px 18px rgba(15, 23, 42, 0.08);
}

.dialog-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
    transition: all 0.22s ease;
    flex-shrink: 0;
}

.dialog-close:hover {
    background: rgba(248,250,252,0.98);
    color: #334155;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.dialog-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}


/* 鍐呭鍖?*/
.analysis-content {
    padding: 28px 32px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* 杈撳叆琛ㄥ崟 */
.analysis-form .form-intro {
    margin-bottom: 20px;
}

.analysis-form .form-intro p {
    font-size: 15px;
    color: rgba(100, 116, 139, 0.92);
    margin: 0;
}

.form-input-group {
    display: flex;
    gap: 14px;
}

.form-input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #fafafa;
}

.form-input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

.form-input-group input::placeholder {
    color: #9ca3af;
}

.submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #fff;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 650;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(37, 99, 235, 0.26);
}

/* 鍔犺浇鐘舵€?*/
.analysis-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.loading-spinner-v2 {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #111827;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin: 20px 0 8px;
    font-size: 15px;
    color: #374151;
    font-weight: 500;
}

.loading-hint {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

/* 鍒嗘瀽缁撴灉 V2 */
.analysis-result-v2 {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 琛屽竷灞€ */
.result-row {
    display: grid;
    gap: 18px;
}

.result-row.two-col {
    grid-template-columns: 1fr 1fr;
}

.result-row.three-col {
    grid-template-columns: repeat(3, 1fr);
}

/* 缁撴灉鍧?- 澧炲己鍦嗘鼎鍜岃繃娓℃晥鏋?*/
.result-block {
    background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(248,250,252,0.78));
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.25s ease;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}

.result-block:hover {
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}

.result-block.compact {
    padding: 18px;
}

.result-block.compact h4 {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.result-block.compact p {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

/* 杞寲寤鸿鐗规畩鏍峰紡 */
.result-block.conversion-block {
    grid-column: span 1;
}

.conversion-content {
    font-size: 13px;
    color: #374151;
    line-height: 1.8;
    max-height: 200px;
    overflow-y: auto;
}

.conversion-content br {
    display: block;
    margin: 8px 0;
}

.block-header {
    margin-bottom: 14px;
}

.block-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
}

.block-tag.tag-blue {
    background: rgba(37, 99, 235, 0.07);
    color: rgba(37, 99, 235, 0.88);
    border-color: rgba(37, 99, 235, 0.08);
}

.block-tag.tag-gray {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    border-color: rgba(15, 23, 42, 0.05);
}

.block-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.75;
    margin: 0;
}

/* 缁撴灉鍖哄煙 - 鍦嗘鼎杩囨浮 */
.result-section {
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,250,252,0.86));
    border: 1px solid rgba(37, 99, 235, 0.07);
    border-radius: 22px;
    padding: 22px;
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.04), inset 0 1px 0 rgba(255,255,255,0.9);
}

.result-section:hover {
    border-color: rgba(37, 99, 235, 0.14);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.06);
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-hint {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
    margin-left: auto;
}

/* 娲炲療缃戞牸 - 鍦嗘鼎 */
.insight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.insight-block {
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,250,252,0.88));
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
}

.insight-block:hover {
    border-color: rgba(37, 99, 235, 0.12);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.05);
}

.insight-block .insight-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.insight-block p {
    font-size: 13px;
    color: #374151;
    line-height: 1.65;
    margin: 0;
}

/* 鎻愮ず璇嶅尯鍩?- 鍦嗘鼎 */
.prompts-section {
    background: #fff;
    border: 1px solid #eef0f2;
}

.prompts-list-v2 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prompts-list-v2 button,
.prompt-chip {
    width: 100%;
    padding: 16px 18px;
    background: rgba(15,23,42,0.04);
    border: 1px solid rgba(15,23,42,0.05);
    border-radius: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: left;
    line-height: 1.65;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.025);
}

.prompts-list-v2 button:hover,
.prompt-chip:hover {
    background: rgba(37,99,235,0.09);
    border-color: rgba(37,99,235,0.12);
    color: var(--accent-primary);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.05);
    transform: translateY(-1px);
}

/* 搴曢儴鎿嶄綔 */
.result-footer {
    display: flex;
    justify-content: center;
    padding-top: 12px;
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(241,245,249,0.95));
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 650;
    color: var(--text-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.btn-secondary:hover {
    background: rgba(241,245,249,0.98);
    border-color: rgba(37, 99, 235, 0.16);
    color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
}

/* 鍝嶅簲寮?*/
@media (max-width: 768px) {
    .analysis-dialog-v2 {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .result-row.two-col,
    .result-row.three-col,
    .insight-grid {
        grid-template-columns: 1fr;
    }

    .form-input-group {
        flex-direction: column;
    }
}

/* === 鍥剧墖鏀惧ぇ寮圭獥 === */
.modal-backdrop.lightbox {
    background: rgba(0, 0, 0, 0.92);
    z-index: 250; /* 楂樹簬鍘嗗彶寮圭獥锛?00锛夛紝纭繚浠庡巻鍙茶褰曠偣鍑诲浘鐗囨椂lightbox鏄剧ず鍦ㄦ渶涓婂眰 */
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition-normal);
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: none;
}

#lightboxImage {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

/* Lightbox 鎿嶄綔鎸夐挳 */
.lightbox-actions {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    z-index: 10;
}

.lightbox-action-btn,
.analysis-action-btn,
.individual-action-btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.lightbox-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--sys-control-md);
    padding: 8px 12px;
    background: var(--accent-primary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 650;
    color: var(--text-inverse);
    box-shadow: var(--shadow-xs);
    border: 1px solid transparent;
}

.lightbox-action-btn:hover {
    transform: none;
    background: var(--accent-secondary);
    box-shadow: var(--shadow-xs);
}

.lightbox-action-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.16), 0 20px 34px rgba(37, 99, 235, 0.22);
}

.lightbox-action-btn.secondary {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}

.lightbox-action-btn.secondary:hover {
    background: rgba(255,255,255,0.2);
    box-shadow: none;
}

/* ---------------------------------------------------------
 * Module / History Center
 * --------------------------------------------------------- */

/* === 鍘嗗彶璁板綍寮圭獥 === */
.history-dialog {
    width: 860px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 40px);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    border: 1px solid var(--border-primary);
    overflow: hidden;
    animation: dialog-in 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-premium-dialog {
    position: relative;
}

.history-premium-dialog::before {
    display: none;
}

.history-dialog-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-primary);
}

.history-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.history-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    flex-shrink: 0;
}

.history-title-wrap h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.history-title-wrap p {
    margin: 4px 0 0;
    font-size: 11px;
    line-height: 1.6;
    color: #64748b;
    max-width: 520px;
}

.dialog-body {
    padding: 24px 28px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.history-dialog-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.history-summary-card {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    box-shadow: none;
}

.history-summary-label {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.07);
    color: rgba(37, 99, 235, 0.88);
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.history-summary-card p {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.history-loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 160px;
    color: var(--sys-color-text-secondary, #667085);
    border: 1px dashed var(--sys-color-border, #e4e7ec);
    border-radius: 16px;
    background: var(--sys-color-surface-subtle, #f8fafc);
    font-size: 13px;
}

.history-loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #dbeafe;
    border-top-color: var(--sys-color-primary, #2563eb);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.history-record-card {
    overflow: hidden;
    border: 1px solid var(--sys-color-border, #e4e7ec);
    border-radius: 18px;
    background: var(--sys-color-surface, #fff);
    box-shadow: var(--sys-shadow-sm, 0 2px 8px rgba(16, 24, 40, 0.06));
    transition: border-color var(--sys-motion-fast), box-shadow var(--sys-motion-base), transform var(--sys-motion-base);
}

.history-record-card:hover,
.history-record-card.is-expanded {
    border-color: var(--sys-color-border-selected, #8bb5ff);
    box-shadow: var(--sys-shadow-md, 0 8px 24px rgba(16, 24, 40, 0.09));
}

.history-record-card:hover {
    transform: translateY(-1px);
}

.history-record-summary {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 18px;
    width: 100%;
    min-height: 138px;
    padding: 16px;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.history-record-summary:hover {
    background: var(--sys-color-surface-hover, #f9fafb);
}

.history-record-summary:focus-visible {
    outline: none;
    box-shadow: inset var(--sys-focus-ring, 0 0 0 3px rgba(37, 99, 235, 0.14));
}

.history-record-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3px;
    width: 124px;
    height: 106px;
    overflow: hidden;
    border: 1px solid var(--sys-color-border, #e4e7ec);
    border-radius: 13px;
    background: var(--sys-color-surface-muted, #f2f4f7);
}

.history-record-preview img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

.history-record-preview img:only-child {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
}

.history-record-no-image {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    display: grid;
    place-items: center;
    color: var(--sys-color-text-tertiary, #98a2b3);
    font-size: 12px;
}

.history-record-copy {
    min-width: 0;
}

.history-record-heading,
.history-record-meta,
.history-version-heading,
.history-version-meta,
.history-version-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.history-record-heading {
    justify-content: space-between;
    gap: 10px;
}

.history-record-heading time,
.history-version-header time {
    color: var(--sys-color-text-tertiary, #98a2b3);
    font-size: 11px;
    white-space: nowrap;
}

.history-record-badge,
.history-current-badge,
.history-version-code {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.03em;
}

.history-record-badge {
    color: var(--sys-color-info, #175cd3);
    background: var(--sys-color-info-soft, #eff6ff);
}

.history-record-badge.branch {
    color: #6941c6;
    background: #f4f3ff;
}

.history-record-copy h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 10px 0 9px;
    color: var(--sys-color-text, #1d2939);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.history-record-meta,
.history-version-meta {
    gap: 7px 14px;
    color: var(--sys-color-text-secondary, #667085);
    font-size: 11px;
}

.history-record-chevron {
    display: grid;
    place-items: center;
    color: var(--sys-color-text-tertiary, #98a2b3);
    transition: color var(--sys-motion-fast), transform var(--sys-motion-base);
}

.history-record-card.is-expanded .history-record-chevron {
    color: var(--sys-color-primary, #2563eb);
    transform: rotate(180deg);
}

.history-record-timeline {
    padding: 6px 20px 20px;
    border-top: 1px solid var(--sys-color-border, #e4e7ec);
    background: linear-gradient(180deg, #f8fafc 0, #fff 110px);
}

.history-record-timeline[hidden] {
    display: none;
}

.history-version-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 18px 0 0;
    list-style: none;
}

.history-version-node {
    position: relative;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 14px;
}

.history-version-node:last-child {
    padding-bottom: 0;
}

.history-version-rail {
    position: relative;
    display: flex;
    justify-content: center;
}

.history-version-rail::after {
    position: absolute;
    top: 14px;
    bottom: -15px;
    width: 1px;
    background: #d9e2ef;
    content: '';
}

.history-version-node:last-child .history-version-rail::after {
    display: none;
}

.history-version-dot {
    position: relative;
    z-index: 1;
    width: 10px;
    height: 10px;
    margin-top: 17px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #98a2b3;
    box-shadow: 0 0 0 2px #d0d5dd;
}

.history-version-node.is-current .history-version-dot {
    background: var(--sys-color-primary, #2563eb);
    box-shadow: 0 0 0 3px #dbeafe;
}

.history-version-card {
    padding: 14px;
    border: 1px solid var(--sys-color-border, #e4e7ec);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    transition: border-color var(--sys-motion-fast), box-shadow var(--sys-motion-base);
}

.history-version-node.is-current .history-version-card {
    border-color: #bfdbfe;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.06);
}

.history-version-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.history-version-heading {
    gap: 8px;
    color: var(--sys-color-text, #1d2939);
    font-size: 13px;
}

.history-version-code {
    color: var(--sys-color-primary, #2563eb);
    background: var(--sys-color-primary-soft, #eff6ff);
}

.history-current-badge {
    min-height: 22px;
    color: var(--sys-color-success, #027a48);
    background: var(--sys-color-success-soft, #ecfdf3);
}

.history-version-prompt {
    margin: 10px 0 8px;
    color: var(--sys-color-text-secondary, #667085);
    font-size: 12px;
    line-height: 1.65;
}

.history-version-images {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.history-version-image {
    overflow: hidden;
    padding: 0;
    aspect-ratio: 1;
    border: 1px solid var(--sys-color-border, #e4e7ec);
    border-radius: 10px;
    background: var(--sys-color-surface-muted, #f2f4f7);
    cursor: zoom-in;
}

.history-version-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--sys-motion-base), filter var(--sys-motion-fast);
}

.history-version-image:hover img {
    filter: saturate(1.04);
    transform: scale(1.025);
}

.history-version-image:focus-visible {
    outline: none;
    box-shadow: var(--sys-focus-ring, 0 0 0 3px rgba(37, 99, 235, 0.14));
}

.history-version-more {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 3px 6px;
    color: #fff;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    font-size: 10px;
}

.history-version-empty {
    margin-top: 12px;
    padding: 14px;
    color: var(--sys-color-text-tertiary, #98a2b3);
    border: 1px dashed var(--sys-color-border-strong, #d0d5dd);
    border-radius: 10px;
    background: var(--sys-color-surface-subtle, #f8fafc);
    font-size: 12px;
    text-align: center;
}

.history-version-actions {
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.history-version-btn {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
    transition: background var(--sys-motion-fast), border-color var(--sys-motion-fast), color var(--sys-motion-fast), transform var(--sys-motion-fast);
}

.history-version-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.history-version-btn.primary {
    color: #fff;
    background: var(--sys-color-primary, #2563eb);
}

.history-version-btn.primary:hover:not(:disabled) {
    background: var(--sys-color-primary-hover, #1d4ed8);
}

.history-version-btn.secondary {
    color: var(--sys-color-text-secondary, #667085);
    border-color: var(--sys-color-border, #e4e7ec);
    background: #fff;
}

.history-version-btn.secondary:hover:not(:disabled) {
    color: var(--sys-color-primary, #2563eb);
    border-color: var(--sys-color-border-selected, #8bb5ff);
}

.history-version-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

@media (max-width: 700px) {
    .history-record-summary {
        grid-template-columns: 80px minmax(0, 1fr) 22px;
        gap: 12px;
        min-height: 112px;
        padding: 12px;
    }

    .history-record-preview {
        width: 80px;
        height: 80px;
    }

    .history-record-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .history-record-copy h3 {
        margin: 7px 0;
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .history-record-meta span:nth-child(3) {
        display: none;
    }

    .history-record-timeline {
        padding: 4px 10px 14px;
    }

    .history-version-node {
        grid-template-columns: 18px minmax(0, 1fr);
        gap: 6px;
    }

    .history-version-card {
        padding: 12px;
    }

    .history-version-header {
        flex-direction: column;
        gap: 5px;
    }

    .history-version-images {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .history-version-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .history-version-btn {
        min-height: var(--sys-touch-target, 44px);
    }
}

.history-item {
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(248,250,252,0.78));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.history-item:hover {
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}

.history-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.history-item-header-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.history-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-item-time {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.history-item-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.history-item-prompt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.history-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-inline-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.history-inline-tag.async {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.history-inline-tag.partial {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

.history-inline-tag.analysis {
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
}

.history-item-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.history-item-images img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.history-item-images img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.empty-hint {
    text-align: center;
    padding: 56px 28px;
    color: var(--text-tertiary);
    font-size: 15px;
}

/* === 鍔犺浇閬僵 - 绉戞妧鎰熷寮?=== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    /* Always cover refine/batch/dialog workspaces while AI is generating. */
    z-index: 1200;
}

.loading-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-flow 15s linear infinite;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid rgba(37, 99, 235, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    inset: 12px;
    border-width: 2px;
    border-color: rgba(59, 130, 246, 0.1);
    border-top-color: #3b82f6;
    animation-duration: 0.8s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    inset: 22px;
    border-width: 2px;
    border-color: rgba(96, 165, 250, 0.1);
    border-top-color: #60a5fa;
    animation-duration: 0.6s;
}

/* 涓績鑴夊啿 */
.loading-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: loading-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 20px var(--accent-primary);
}

@keyframes loading-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
}

.loading-content p {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 鍔犺浇鎻愮ず鍔ㄦ€佺偣 */
.loading-content p::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* === 鍝嶅簲寮忚璁?=== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 340px;
    }

    .result-grid {
        max-width: 580px;
        gap: 16px;
    }

    .canvas-toolbar {
        padding: 10px 16px;
        gap: 16px;
    }

    .toolbar-btn span {
        display: none;
    }

    .toolbar-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
        --sidebar-width: 100vw;
    }

    .top-nav {
        padding: 0 16px;
    }

    .brand-text {
        display: none;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: var(--nav-height);
        bottom: 0;
        z-index: 80;
        transform: translateX(0);
    }

    .sidebar.collapsed {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar-inner {
        width: 100vw;
    }

    .canvas-main {
        width: 100%;
    }

    .canvas-toolbar {
        top: 12px;
        padding: 8px 12px;
        gap: 12px;
    }

    .toolbar-title {
        font-size: 13px;
    }

    .toolbar-icon {
        display: none;
    }

    .result-container {
        padding: 70px 16px 24px;
    }

    .result-grid {
        gap: 12px;
    }

    .analysis-dialog,
    .history-dialog {
        width: calc(100vw - 32px);
        margin: 16px;
    }
}

/* === 婊氬姩鏉＄編鍖?=== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* === Toast 閫氱煡绯荤粺 === */
.toast-notification {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--border-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    z-index: 400;
    opacity: 0;
    transition: transform var(--sys-motion-base),
                opacity var(--sys-motion-fast);
    backdrop-filter: blur(12px);
}

.toast-notification.toast-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-notification.toast-hiding {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
}

.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.toast-message {
    max-width: 320px;
    line-height: 1.5;
}

/* Toast 绫诲瀷鍙樹綋 */
.toast-success .toast-icon {
    background: var(--success-light);
    color: var(--success);
}

.toast-error .toast-icon {
    background: #fef2f2;
    color: var(--danger);
}

.toast-warning .toast-icon {
    background: #fef3c7;
    color: var(--warning);
}

.toast-info .toast-icon {
    background: var(--accent-light);
    color: var(--accent-primary);
}

/* === 楂樹寒楠岃瘉鍔ㄧ敾 === */
.highlight-required {
    animation: highlight-shake 0.5s ease;
}

@keyframes highlight-shake {
    0%, 100% {
        transform: translateX(0);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-4px);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(4px);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
    }
}

.upload-slot.highlight-required {
    border-color: var(--danger) !important;
    animation: upload-highlight 0.5s ease;
}

@keyframes upload-highlight {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.02);
    }
    50% {
        transform: scale(0.98);
    }
    75% {
        transform: scale(1.01);
    }
}

.prompt-input.highlight-required {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

/* === 鐢熸垚鎸夐挳鍔犺浇鐘舵€?=== */
.generate-btn.loading {
    pointer-events: none;
    position: relative;
}

.generate-btn.loading .btn-content {
    opacity: 0;
}

.generate-btn.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Shared in-flight feedback for downloads and refine-file preparation. */
.toolbar-btn.is-loading svg,
.action-btn.is-loading svg,
.lightbox-action-btn.is-loading svg,
.nav-btn.loading svg {
    display: none;
}

.toolbar-btn.is-loading::before,
.action-btn.is-loading::before,
.lightbox-action-btn.is-loading::before,
.nav-btn.loading::before {
    content: '';
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.toolbar-btn.is-loading,
.action-btn.is-loading,
.lightbox-action-btn.is-loading,
.nav-btn.loading {
    cursor: wait;
}

/* === 渚ц竟鏍忓垏鎹㈡寜閽姸鎬?=== */
.nav-btn.sidebar-collapsed svg {
    transform: scaleX(-1);
}

.nav-btn.sidebar-collapsed {
    background: var(--accent-light);
    color: var(--accent-primary);
}

/* === 鑱婂ぉ娑堟伅鏍峰紡锛堝井璋冮潰鏉匡級 === */
.chat-message {
    max-width: 85%;
    margin-bottom: 14px;
    animation: message-in 0.3s ease;
}

.chat-message.ai {
    margin-right: auto;
}

.chat-message.user {
    margin-left: auto;
}

.chat-message p {
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.6;
}

.chat-message.ai p {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: var(--radius-sm);
}

.chat-message.user p {
    background: var(--accent-gradient);
    color: var(--text-inverse);
    border-bottom-right-radius: var(--radius-sm);
}

@keyframes message-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === 鍥剧墖鍔犺浇鍗犱綅 === */
.result-item img {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    transition: opacity 0.3s ease;
}

.result-item img[src=""] {
    opacity: 0;
}

/* === 寰氦浜掑寮?=== */
/* 鎸夐挳鐐瑰嚮娉㈢汗鏁堟灉 */
.generate-btn::before,
.ai-analyze-btn::before,
.analyze-submit::before {
    display: none;
}

.generate-btn:active::before,
.ai-analyze-btn:active::before,
.analyze-submit:active::before {
    opacity: 1;
}

/* 杈撳叆妗嗚仛鐒﹀姩鐢?*/
.prompt-input,
.drawer-input input,
.form-field input {
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.prompt-input:focus,
.drawer-input input:focus,
.form-field input:focus {
    transform: none;
}

/* 渚ц竟鏍忔敹璧疯繃娓′紭鍖?*/
.sidebar {
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    box-shadow: none;
}

/* 鐢诲竷鍖哄煙灞曞紑鍔ㄧ敾 */
.canvas-main {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 缁撴灉缃戞牸鍏ュ満鍔ㄧ敾 */
.result-item {
    animation: result-item-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.result-item:nth-child(1) { animation-delay: 0.1s; }
.result-item:nth-child(2) { animation-delay: 0.2s; }
.result-item:nth-child(3) { animation-delay: 0.3s; }
.result-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes result-item-in {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
        filter: blur(10px);
    }
    60% {
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* 缁撴灉椤瑰姞杞藉畬鎴愬悗鐨勮剦鍐叉晥鏋?*/
.result-item.loaded::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid var(--accent-primary);
    animation: item-loaded-pulse 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes item-loaded-pulse {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.1);
    }
}


/* 鎮仠鏁堟灉澧炲己 */
.upload-slot:hover .placeholder-icon svg {
    animation: icon-wiggle 0.5s ease;
}

@keyframes icon-wiggle {
    0%, 100% {
        transform: rotate(0);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

/* ============================================
   AI 璁捐鍒嗘瀽闈㈡澘 - 绠€娲佸姛鑳藉鍚?   ============================================ */

.ai-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.56);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    z-index: 89;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.ai-panel-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ---------------------------------------------------------
 * Module / Analysis Center
 * --------------------------------------------------------- */

.analysis-center-shell {
    position: fixed;
    inset: clamp(10px, 1.4vw, 18px);
    transform: translateY(18px) scale(0.995);
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
}

.analysis-center-shell.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.analysis-center-frame,
.analysis-center-frame-v4 {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
    background: var(--bg-primary);
    box-shadow: var(--shadow-2xl);
}

.analysis-center-topbar,
.analysis-topbar-v4 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr) auto;
    gap: 24px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-primary);
}

.analysis-center-topbar-stack {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.analysis-center-inline-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.analysis-inline-hint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255,255,255,0.88);
    color: rgba(15, 23, 42, 0.82);
}

.analysis-inline-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: rgba(100, 116, 139, 0.84);
}

.analysis-center-brand {
    display: block;
}

.analysis-center-brand-copy {
    display: grid;
    gap: 8px;
}

.analysis-center-eyebrow {
    display: none;
}

.analysis-center-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: #0f172a;
    font-weight: 800;
}

.analysis-center-subtitle {
    margin: 0;
    max-width: 540px;
    color: rgba(51, 65, 85, 0.82);
    font-size: 13px;
    line-height: 1.75;
}

.analysis-center-session-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-content: flex-start;
    padding-top: 6px;
}

.analysis-center-command-strip {
    display: grid;
    gap: 10px;
}

.analysis-command-card,
.analysis-command-board-item {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(30,41,59,0.92));
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.analysis-command-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(191, 219, 254, 0.72);
}

.analysis-command-card strong,
.analysis-command-board-item strong {
    font-size: 14px;
    line-height: 1.55;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

.analysis-session-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(250, 250, 250, 0.94);
    color: rgba(51, 65, 85, 0.74);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.analysis-session-pill.is-ready {
    border-color: rgba(37, 99, 235, 0.18);
    background: rgba(219, 234, 254, 0.72);
    color: #1d4ed8;
}

.analysis-center-close {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: rgba(51, 65, 85, 0.78);
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.analysis-center-close:hover {
    transform: translateY(-1px);
    color: #dc2626;
    background: rgba(254, 242, 242, 0.92);
}

.analysis-center-body,
.analysis-body-v4 {
    min-height: 0;
    display: block;
    overflow: auto;
    background: linear-gradient(180deg, rgba(252,253,255,0.9), rgba(247,249,252,0.96));
}

.analysis-center-main,
.analysis-main-v4 {
    min-width: 0;
    min-height: 0;
    width: min(1520px, calc(100vw - clamp(28px, 4vw, 96px)));
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: clamp(18px, 2.2vw, 28px);
    padding: clamp(18px, 2.2vw, 28px) 0 clamp(24px, 3vw, 36px);
}

.analysis-entry-v4,
.analysis-entry-hero-v4,
.analysis-entry-context-grid {
    display: grid;
    gap: 18px;
}

.analysis-entry-hero-v4 {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    align-items: stretch;
}

.analysis-entry-actions-v4 {
    display: grid;
    gap: 14px;
}

.analysis-entry-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-items-inline,
.analysis-business-grid-inline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analysis-business-card-v4 .ai-analysis-tip-card {
    margin-top: 14px;
}

.analysis-center-context-card,
.analysis-center-note,
.analysis-side-card,
.ai-analysis-card,
.ai-prompts-card,
.ai-workspace-summary-card,
.ai-loading {
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    background: linear-gradient(180deg, rgba(255,255,255,0.975), rgba(248,249,251,0.9));
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.035), inset 0 1px 0 rgba(255,255,255,0.88);
}

.analysis-center-card-head,
.analysis-side-card-head {
    display: grid;
    gap: 6px;
}

.analysis-center-card-kicker,
.analysis-side-card-kicker,
.action-kicker,
.analysis-entry-kicker {
    display: none;
}

.analysis-center-card-title,
.analysis-side-card h4 {
    margin: 0;
    font-size: 17px;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.analysis-center-card-meta {
    color: rgba(100, 116, 139, 0.84);
    font-size: 12px;
    line-height: 1.6;
}

.analysis-status-card {
    padding: 20px;
}

.analysis-center-context-grid {
    margin-top: 16px;
}

.status-items {
    display: grid;
    gap: 10px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 16px;
    background: rgba(255,255,255,0.76);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.item-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #10b981;
    flex-shrink: 0;
}

.item-dot.empty {
    background: #cbd5e1;
}

.item-dot.filled {
    background: #10b981;
}

.item-label {
    font-size: 13px;
    color: rgba(51, 65, 85, 0.82);
    width: 56px;
}

.item-value {
    font-size: 13px;
    color: #0f172a;
    font-weight: 600;
}

.analysis-center-status-note,
.status-subtitle {
    margin: 14px 0 0;
    font-size: 12px;
    color: rgba(100, 116, 139, 0.92);
    line-height: 1.7;
}

.analysis-center-business-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,247,250,0.94));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.analysis-business-grid {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.analysis-business-item {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-business-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(100, 116, 139, 0.88);
}

.analysis-business-value {
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.ai-task-grid {
    display: grid;
    gap: 12px;
}

.analysis-action-btn {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
    background: var(--bg-primary);
    cursor: pointer;
    text-align: left;
    box-shadow: var(--shadow-xs);
}

.analysis-action-btn:hover:not(:disabled) {
    transform: none;
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-sm);
}

.analysis-action-btn:disabled {
    opacity: 0.68;
    cursor: not-allowed;
    box-shadow: none;
}

.analysis-action-btn.primary:not(:disabled) {
    color: var(--text-inverse);
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    box-shadow: var(--shadow-xs);
}

.analysis-action-btn.primary:not(:disabled) .action-title,
.analysis-action-btn.primary:not(:disabled) .action-desc,
.analysis-action-btn.primary:not(:disabled) .action-kicker {
    color: inherit;
}

.analysis-action-btn.secondary.enabled {
    border-color: var(--border-secondary);
    background: var(--bg-secondary);
}

.analysis-action-btn .action-content {
    display: grid;
    gap: 7px;
}

.analysis-action-btn .action-title {
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.analysis-action-btn .action-desc {
    font-size: 12px;
    line-height: 1.75;
    color: rgba(71, 85, 105, 0.88);
}

.analysis-action-btn .action-hint {
    font-size: 11px;
    line-height: 1.65;
    color: rgba(100, 116, 139, 0.92);
}

.analysis-center-note {
    padding: 16px 18px;
    color: rgba(51, 65, 85, 0.88);
    font-size: 12px;
    line-height: 1.85;
}

.analysis-mode-nav,
.analysis-mode-nav-v4 {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    width: fit-content;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.04);
}

.analysis-mode-tab {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255,255,255,0.9);
    font-size: 12px;
    color: rgba(51, 65, 85, 0.82);
    font-weight: 700;
}

.analysis-mode-tab.is-active {
    background: rgba(15, 23, 42, 0.92);
    color: #eff6ff;
}

.ai-workspace-summary {
    padding: 0;
}

.analysis-center-summary-card,
.ai-workspace-summary-card {
    padding: 18px 20px;
}

.analysis-command-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.analysis-center-summary-head,
.ai-workspace-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ai-workspace-summary-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.ai-workspace-summary-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 11px;
    font-weight: 700;
}

.ai-workspace-summary-meta {
    margin: 0 0 8px;
    color: rgba(100, 116, 139, 0.84);
    font-size: 12px;
}

.ai-workspace-summary-text {
    margin: 0;
    color: rgba(51, 65, 85, 0.9);
    font-size: 13px;
    line-height: 1.8;
}

.analysis-center-stage,
.ai-workspace-body,
.analysis-stage-v4 {
    min-height: 0;
    display: grid;
    gap: 20px;
    padding: 0;
    overflow: visible;
}

.ai-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.analysis-decision-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.analysis-decision-item {
    padding: 14px 14px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-decision-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: rgba(100, 116, 139, 0.82);
}

.analysis-decision-value {
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.analysis-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.analysis-score-card {
    padding: 14px 14px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-score-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: rgba(100, 116, 139, 0.82);
}

.analysis-score-value {
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: #0f172a;
}

.analysis-center-stage::-webkit-scrollbar,
.ai-workspace-body::-webkit-scrollbar {
    width: 8px;
}

.analysis-center-stage::-webkit-scrollbar-thumb,
.ai-workspace-body::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.12);
    border-radius: 999px;
}

.analysis-center-followup,
.analysis-followup-v4 {
    display: grid;
    gap: 16px;
    padding: 24px 26px;
    border-radius: 26px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 22%),
        linear-gradient(180deg, rgba(255,255,255,0.985), rgba(246,247,249,0.95));
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.analysis-history-workspace-v4 {
    display: grid;
    gap: 18px;
    padding: 24px 26px;
    border-radius: 26px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.985), rgba(246,247,249,0.95));
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.analysis-history-layout {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: clamp(14px, 1.8vw, 18px);
}

.analysis-history-list,
.analysis-history-preview {
    min-height: 420px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255,255,255,0.88);
}

.history-item-archive {
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,247,250,0.94));
}

.analysis-history-list {
    padding: 14px;
    display: grid;
    gap: 12px;
    align-content: start;
    max-height: 70vh;
    overflow: auto;
}

.analysis-history-preview {
    padding: 18px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,247,250,0.96));
}

.analysis-history-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    color: rgba(100, 116, 139, 0.88);
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
}

.analysis-history-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.history-restore-btn.secondary {
    background: rgba(255,255,255,0.94);
    color: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.analysis-history-preview-shell {
    display: grid;
    gap: 18px;
}

.analysis-history-readonly-card {
    border-color: rgba(59, 130, 246, 0.10);
    background: linear-gradient(180deg, rgba(255,255,255,0.995), rgba(244,247,252,0.96));
}

.analysis-history-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.analysis-history-preview-head {
    display: grid;
    gap: 6px;
}

.analysis-history-preview-head h4 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: #0f172a;
}

.analysis-history-preview-head p {
    margin: 0;
    color: rgba(100, 116, 139, 0.84);
    font-size: 13px;
}

.analysis-history-preview-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.analysis-history-preview-images img {
    width: 100%;
    aspect-ratio: 1.1 / 1;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    display: block;
}

.analysis-center-followup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.analysis-center-followup-hint {
    font-size: 12px;
    color: rgba(100, 116, 139, 0.88);
}

.analysis-followup-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.analysis-followup-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255,255,255,0.88);
    font-size: 12px;
    color: rgba(51, 65, 85, 0.84);
}

.analysis-center-followup-bar,
.analysis-followup-bar-v4 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 12px;
}

.analysis-center-followup-input {
    min-height: 76px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255,255,255,0.92);
    color: #0f172a;
    font-size: 13px;
    line-height: 1.7;
    resize: vertical;
}

.analysis-center-followup-send {
    align-self: stretch;
    min-width: 120px;
    padding: 0 18px;
    border-radius: 16px;
    background: linear-gradient(145deg, #0f172a 0%, #1e40af 52%, #3b82f6 100%);
    color: #eff6ff;
    font-size: 13px;
    font-weight: 700;
}

.analysis-center-entry {
    display: grid;
    gap: 18px;
}

.analysis-entry-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
    gap: 18px;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background:
        radial-gradient(circle at top left, rgba(59,130,246,0.15), transparent 32%),
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.9));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.analysis-entry-title {
    margin: 10px 0 0;
    font-size: 34px;
    line-height: 1.02;
    letter-spacing: -0.05em;
    color: #020617;
}

.analysis-entry-desc {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.85;
    color: rgba(51, 65, 85, 0.88);
    max-width: 760px;
}

.analysis-entry-metrics {
    display: grid;
    gap: 12px;
    align-content: end;
}

.analysis-entry-metric {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.analysis-entry-metric-label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: rgba(100, 116, 139, 0.88);
}

.analysis-entry-metric strong {
    font-size: 15px;
    color: #0f172a;
}

.analysis-entry-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.analysis-entry-card {
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,246,250,0.92));
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.analysis-entry-card-accent {
    background: linear-gradient(145deg, rgba(15,23,42,0.96), rgba(30,64,175,0.95));
    color: #eff6ff;
}

.analysis-entry-card-accent h4,
.analysis-entry-card-accent p {
    color: inherit;
}

.analysis-entry-card-index {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(15,23,42,0.06);
    color: #0f172a;
}

.analysis-entry-card-accent .analysis-entry-card-index {
    background: rgba(255,255,255,0.12);
    color: #eff6ff;
}

.analysis-entry-card h4 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #0f172a;
}

.analysis-entry-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(51, 65, 85, 0.9);
}

.ai-message {
    padding: 16px 20px;
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-message-bubble {
    display: grid;
    gap: 16px;
}

.ai-followup-result {
    padding-left: 0;
    padding-right: 0;
}

.ai-followup-bubble {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.analysis-followup-hero-card {
    grid-column: 1 / -1;
    background: linear-gradient(145deg, rgba(15,23,42,0.98), rgba(30,64,175,0.94));
    color: #eff6ff;
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.18);
}

.analysis-followup-hero-card h4,
.analysis-followup-hero-card .ai-collapsible-content,
.analysis-followup-hero-card .ai-collapsible-toggle {
    color: inherit;
}

.analysis-followup-decision {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.16);
    font-size: 13px;
    line-height: 1.7;
}

.ai-report-shell {
    display: grid;
    gap: 18px;
    padding-bottom: 4px;
}

.analysis-workbench-grid,
.ai-report-grid,
.ai-report-grid-wide {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(260px, 0.88fr) minmax(0, 1.34fr) minmax(260px, 0.9fr);
    align-items: start;
}

.analysis-generated-layout {
    display: grid;
    gap: 18px;
}

.analysis-upload-strategy-grid,
.analysis-upload-ops-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.analysis-generated-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.52fr) minmax(400px, 0.9fr);
    gap: 20px;
    align-items: stretch;
}

.analysis-generated-hero-main,
.analysis-generated-hero-side,
.analysis-generated-board,
.analysis-generated-review-column,
.analysis-generated-action-column,
.ai-report-section {
    display: grid;
    gap: 16px;
}

.analysis-generated-hero-head {
    display: grid;
    gap: 8px;
}

.analysis-generated-hero-title {
    font-size: 34px;
    line-height: 1.03;
    letter-spacing: -0.06em;
    max-width: 14ch;
}

.analysis-generated-hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.analysis-generated-metric {
    padding: 16px 18px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,246,250,0.9));
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 10px 20px rgba(15, 23, 42, 0.04);
    position: relative;
}

.analysis-generated-metric::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(15,23,42,0.14), transparent);
}

.analysis-generated-metric-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(100, 116, 139, 0.88);
}

.analysis-generated-metric strong {
    font-size: 18px;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.analysis-generated-board {
    grid-template-columns: minmax(0, 1.46fr) minmax(360px, 0.74fr);
    align-items: start;
}

.analysis-generated-action-column {
    align-content: start;
}

.analysis-lead-column,
.ai-report-lead,
.analysis-side-column,
.ai-report-actions {
    position: sticky;
    top: 0;
    align-self: start;
}

.ai-report-section-head {
    display: grid;
    gap: 8px;
}

.ai-report-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 0 0 8px;
    border-radius: 0;
    background: transparent;
    color: rgba(15, 23, 42, 0.58);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.22em;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.ai-report-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.22;
    letter-spacing: -0.03em;
    color: #020617;
}

.analysis-lead-panel {
    border-radius: 24px;
    background: linear-gradient(145deg, #0f172a, #111827 62%, #1e3a8a);
    color: #e2e8f0;
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.24);
}

.analysis-lead-panel .ai-collapsible-content,
.analysis-lead-panel .ai-collapsible-toggle {
    color: inherit;
}

.analysis-lead-panel .ai-collapsible-toggle {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.1);
}

.analysis-lead-note,
.ai-next-step-tip {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255,255,255,0.72);
    color: rgba(51, 65, 85, 0.9);
    font-size: 12px;
    line-height: 1.8;
}

.analysis-lead-note-hero {
    position: relative;
    padding-left: 54px;
}

.analysis-lead-note-hero::before {
    content: 'NOTE';
    position: absolute;
    left: 18px;
    top: 16px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(15, 23, 42, 0.58);
}

.analysis-choice-banner {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(245,158,11,0.16), rgba(250,204,21,0.1));
    border: 1px solid rgba(245, 158, 11, 0.16);
    color: #92400e;
}

.analysis-choice-banner-large {
    padding: 30px 30px 26px;
    border-radius: 28px;
    gap: 12px;
    box-shadow: 0 24px 44px rgba(245, 158, 11, 0.16);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.38), transparent 34%),
        linear-gradient(160deg, rgba(255,250,240,0.99), rgba(255,244,214,0.95));
    border: 1px solid rgba(245, 158, 11, 0.18);
}

.analysis-choice-banner-large::after {
    content: '';
    position: absolute;
    inset: auto -30px -30px auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 70%);
}

.analysis-choice-banner-large strong {
    font-size: 30px;
    line-height: 1.18;
    letter-spacing: -0.05em;
}

.analysis-choice-banner-large p {
    margin: 0;
    font-size: 13px;
    line-height: 1.85;
    color: rgba(146, 64, 14, 0.86);
    max-width: 46ch;
}

.analysis-choice-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.ai-analysis-card {
    overflow: hidden;
}

.analysis-card-emphasis,
.analysis-card-spotlight {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.analysis-card-spotlight {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.995), rgba(244,246,249,0.95));
}

.analysis-card-spotlight h4 {
    font-size: 15px;
    padding: 18px 20px;
}

.analysis-card-spotlight .ai-collapsible-block,
.analysis-card-spotlight p {
    padding-left: 20px;
    padding-right: 20px;
}

.analysis-card-body {
    padding: 16px 18px 18px;
}

.analysis-insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.analysis-insight-item {
    padding: 14px 15px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-insight-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: rgba(100, 116, 139, 0.84);
}

.analysis-insight-value {
    font-size: 13px;
    line-height: 1.6;
    color: #0f172a;
}

.analysis-mini-list {
    display: grid;
    gap: 10px;
}

.analysis-mini-list-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-mini-list-index {
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15,23,42,0.08);
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
}

.analysis-mini-list-text {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(51, 65, 85, 0.92);
}

.analysis-segment-grid {
    display: grid;
    gap: 12px;
}

.analysis-segment-card {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,249,252,0.92));
}

.analysis-segment-head {
    margin-bottom: 10px;
    color: #0f172a;
}

.analysis-priority-list {
    display: grid;
    gap: 12px;
    padding: 16px 18px 18px;
}

.analysis-priority-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-priority-badge {
    min-width: 36px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(145deg, #0f172a, #1e3a8a);
    color: #eff6ff;
    font-size: 11px;
    font-weight: 800;
}

.analysis-priority-copy strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #0f172a;
}

.analysis-priority-copy p {
    margin: 0 0 6px;
    padding: 0;
    font-size: 13px;
    line-height: 1.7;
}

.analysis-priority-meta,
.analysis-list-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: rgba(100, 116, 139, 0.84);
}

.analysis-audience-panel {
    display: grid;
    gap: 18px;
}

.analysis-audience-basis {
    margin: 0;
    padding: 13px 16px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.88), rgba(255, 255, 255, 0.94));
    color: #475569;
    font-size: 13px;
    line-height: 1.7;
}

.analysis-audience-personas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.analysis-audience-personas > article {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.analysis-audience-personas > article > div {
    display: flex;
    gap: 8px;
    align-items: center;
}

.analysis-audience-personas > article > div span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #111827;
    color: #f8fafc;
    font-size: 10px;
    font-weight: 800;
}

.analysis-audience-personas article strong {
    color: #0f172a;
    font-size: 13px;
    line-height: 1.45;
}

.analysis-audience-personas article > p {
    margin: 10px 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.65;
}

.analysis-audience-personas dl,
.analysis-audience-personas dl div {
    display: grid;
    gap: 4px;
    margin: 0;
}

.analysis-audience-personas dl {
    gap: 8px;
}

.analysis-audience-personas dt {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.analysis-audience-personas dd {
    margin: 0;
    color: #334155;
    font-size: 12px;
    line-height: 1.55;
}

.analysis-audience-reaction-groups {
    display: grid;
    gap: 12px;
}

.analysis-audience-reaction-groups details {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 17px;
    background: rgba(248, 250, 252, 0.78);
}

.analysis-audience-reaction-groups summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    color: #0f172a;
}

.analysis-audience-reaction-groups summary::-webkit-details-marker {
    display: none;
}

.analysis-audience-reaction-groups summary span {
    font-size: 14px;
    font-weight: 850;
}

.analysis-audience-reaction-groups summary b {
    color: #64748b;
    font-size: 11px;
}

.analysis-audience-reaction-groups details > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    padding: 0 12px 12px;
}

.analysis-audience-reaction {
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-left: 3px solid #94a3b8;
    border-radius: 14px;
    background: #fff;
}

.analysis-audience-reaction.is-click { border-left-color: #10b981; }
.analysis-audience-reaction.is-hesitate { border-left-color: #f59e0b; }
.analysis-audience-reaction.is-skip { border-left-color: #f43f5e; }

.analysis-audience-reaction header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.analysis-audience-reaction header span {
    color: #475569;
    font-size: 11px;
    font-weight: 750;
}

.analysis-audience-reaction header b {
    flex: 0 0 auto;
    color: #0f172a;
    font-size: 11px;
}

.analysis-audience-reaction blockquote {
    margin: 10px 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.6;
}

.analysis-audience-reaction p {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 8px;
    margin: 6px 0 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
}

.analysis-audience-reaction p strong {
    color: #94a3b8;
    font-size: 10px;
    letter-spacing: 0.05em;
}

.analysis-audience-synthesis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.96));
}

.analysis-audience-synthesis-head,
.analysis-audience-synthesis .is-final {
    grid-column: 1 / -1;
}

.analysis-audience-synthesis-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 2px 2px 8px;
}

.analysis-audience-synthesis-head span {
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.analysis-audience-synthesis-head strong {
    color: #334155;
    font-size: 12px;
}

.analysis-audience-synthesis section {
    padding: 13px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
}

.analysis-audience-synthesis section > b {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 12px;
}

.analysis-audience-synthesis section > p {
    margin: 0;
    color: #334155;
    font-size: 13px;
    line-height: 1.7;
}

.analysis-audience-synthesis .is-final {
    border: 1px solid rgba(37, 99, 235, 0.12);
    background: rgba(219, 234, 254, 0.54);
}

@media (max-width: 760px) {
    .analysis-audience-synthesis {
        grid-template-columns: 1fr;
    }

    .analysis-audience-synthesis-head,
    .analysis-audience-synthesis .is-final {
        grid-column: auto;
    }
}

.analysis-two-column-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 16px 18px 18px;
}

.inline-prompts-card {
    margin-top: 8px;
}

.analysis-report-v4 {
    display: grid;
    gap: 28px;
}

.analysis-hero-v4,
.analysis-section-v4 {
    display: grid;
    gap: 18px;
}

.analysis-hero-v4 {
    padding: 30px 32px;
    border-radius: 30px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.995), rgba(245,248,252,0.96));
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.07);
}

.analysis-hero-generated-v4 {
    gap: 22px;
    padding-top: 32px;
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.14), transparent 22%),
        radial-gradient(circle at left top, rgba(59, 130, 246, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.997), rgba(245,248,252,0.975));
}

.analysis-report-upload-v4 .analysis-hero-v4 {
    gap: 22px;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.10), transparent 22%),
        radial-gradient(circle at left top, rgba(59, 130, 246, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.997), rgba(245,248,252,0.975));
}

.analysis-report-upload-v4 .analysis-decision-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analysis-report-upload-v4 .analysis-decision-item,
.analysis-report-upload-v4 .analysis-score-card {
    padding: 16px 16px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.analysis-hero-copy {
    display: grid;
    gap: 14px;
}

.analysis-report-generated-v4 .analysis-hero-copy {
    gap: 16px;
}

.analysis-report-generated-v4 .analysis-decision-bar,
.analysis-report-generated-v4 .analysis-score-grid {
    gap: 12px;
}

.analysis-report-generated-v4 .analysis-decision-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analysis-report-generated-v4 .analysis-decision-item,
.analysis-report-generated-v4 .analysis-score-card {
    padding: 16px 16px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.analysis-report-generated-v4 .analysis-score-value {
    font-size: 24px;
}

.analysis-section-heading {
    display: grid;
    gap: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.analysis-section-heading h4 {
    margin: 0;
    font-size: 26px;
    line-height: 1.16;
    letter-spacing: -0.045em;
    color: #0f172a;
}

.analysis-panel-grid-v4 {
    display: grid;
    gap: 18px;
}

.analysis-panel-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.analysis-report-generated-v4 .analysis-section-v4,
.analysis-report-upload-v4 .analysis-section-v4 {
    gap: 20px;
}

.analysis-candidate-board-v4 {
    padding: 24px 24px 28px;
    border-radius: 32px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 26%),
        radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.995), rgba(242,246,251,0.97));
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 26px 56px rgba(15, 23, 42, 0.07);
}

.analysis-candidate-board-v4 .analysis-section-heading {
    padding-bottom: 14px;
}

.analysis-lane-grid-v4 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.analysis-lane-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    border-radius: 30px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.995), rgba(243,247,252,0.97));
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.07);
    position: relative;
    overflow: hidden;
}

.analysis-lane-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
}

.analysis-lane-card-primary {
    border-color: rgba(245, 158, 11, 0.18);
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.08);
}

.analysis-lane-card-secondary {
    border-color: rgba(37, 99, 235, 0.12);
}

.analysis-lane-card-hold {
    border-color: rgba(148, 163, 184, 0.16);
}

.analysis-lane-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 2px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.analysis-lane-head h5 {
    margin: 0;
    font-size: 20px;
    line-height: 1.16;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.analysis-lane-kicker,
.analysis-lane-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.analysis-lane-kicker {
    background: rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.82);
}

.analysis-lane-count {
    margin-left: auto;
    background: rgba(148, 163, 184, 0.10);
    color: rgba(51, 65, 85, 0.82);
}

.analysis-candidate-grid-v4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.candidate-review-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at top right, rgba(59,130,246,0.08), transparent 22%),
        linear-gradient(180deg, rgba(255,255,255,0.998), rgba(246,248,252,0.97));
    box-shadow: 0 22px 38px rgba(15, 23, 42, 0.06);
}

.candidate-review-card.is-best-choice {
    border-color: rgba(245, 158, 11, 0.28);
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 24%),
        linear-gradient(180deg, rgba(255,252,245,0.998), rgba(250,246,236,0.97));
    box-shadow: 0 28px 52px rgba(245, 158, 11, 0.18);
}

.candidate-best-ribbon {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #facc15);
    color: #3b2600;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.18em;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.26);
}

.candidate-review-shell {
    display: grid;
    grid-template-columns: minmax(250px, 0.9fr) minmax(0, 1.35fr);
    align-items: stretch;
    min-height: 100%;
}

.candidate-review-media {
    position: relative;
    padding: 18px;
    border-right: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(240,244,251,0.72), rgba(255,255,255,0.18));
}

.candidate-review-media.is-best-choice {
    background: linear-gradient(180deg, rgba(255,244,214,0.68), rgba(255,255,255,0.12));
}

.candidate-best-glow {
    position: absolute;
    inset: 18px;
    border-radius: 22px;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.36), 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.candidate-review-body {
    display: grid;
    gap: 16px;
    padding: 20px 22px 22px;
    align-content: start;
}

.candidate-review-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
}

.candidate-review-head h4 {
    margin: 6px 0 0;
    font-size: 21px;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.candidate-score-stack {
    display: grid;
    gap: 10px;
    justify-items: end;
    align-content: start;
}

.candidate-score-stack.is-best-choice {
    padding: 10px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,251,235,0.96), rgba(255,244,214,0.92));
    border: 1px solid rgba(245, 158, 11, 0.20);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}

.candidate-review-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.candidate-review-insights,
.candidate-review-notes {
    display: grid;
    gap: 12px;
}

.candidate-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.candidate-status-chip.is-strong {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.candidate-status-chip.is-mid {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.candidate-status-chip.is-risk {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.candidate-status-chip-muted {
    background: rgba(148, 163, 184, 0.12);
    color: rgba(51, 65, 85, 0.82);
}

.candidate-review-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.candidate-review-actions .individual-action-btn {
    min-width: 132px;
}

.candidate-review-block {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.68);
}

.analysis-command-board-v4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-analysis-card.generated-analysis {
    border-left: none;
}

.ai-analysis-card h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 18px;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(241,245,249,0.82));
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.ai-analysis-card h4::before {
    content: '';
    width: 18px;
    height: 1px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.18);
}

.ai-analysis-card p {
    margin: 0;
    padding: 16px 18px;
    font-size: 13px;
    color: rgba(51, 65, 85, 0.92);
    line-height: 1.8;
}

.ai-summary {
    margin: 0 !important;
    padding: 22px 22px 20px;
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(15,23,42,0.98), rgba(30,64,175,0.92));
    color: #eff6ff !important;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 28px 54px rgba(15, 23, 42, 0.24);
    font-size: 15px !important;
    font-weight: 650;
    line-height: 1.9;
}

.ai-report-main,
.ai-report-actions {
    display: grid;
    gap: 16px;
}

.individual-analysis-grid {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.individual-analysis-grid-rich {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 18px;
}

.individual-item {
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.88));
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.individual-item:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.08);
}

.individual-item-rich {
    padding: 18px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(59,130,246,0.10), transparent 20%),
        linear-gradient(180deg, rgba(255,255,255,0.995), rgba(245,247,251,0.94));
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
    position: relative;
}

.individual-item-rich::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.individual-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(135deg, rgba(15,23,42,0.94), rgba(30,64,175,0.82));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 34px rgba(15, 23, 42, 0.10);
    margin-bottom: 0;
}

.individual-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.individual-preview-overlay {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #eff6ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    backdrop-filter: blur(10px);
    transition: transform 0.18s ease, background 0.18s ease;
}

.individual-preview:hover .individual-preview-overlay {
    transform: translateY(-1px);
    background: rgba(15, 23, 42, 0.88);
}

.individual-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.78);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.individual-item .item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
}

.individual-item-title-wrap {
    display: grid;
    gap: 4px;
}

.individual-item-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(59, 130, 246, 0.78);
}

.individual-item-insights {
    display: grid;
    gap: 10px;
}

.analysis-review-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.995), rgba(244,247,252,0.94));
    border-color: rgba(15, 23, 42, 0.08);
}

.analysis-review-card h4 {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,252,0.9));
}

.individual-item-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.individual-action-btn {
    padding: 9px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.individual-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.12);
}

.individual-action-btn.secondary {
    background: rgba(255,255,255,0.92);
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.16);
}

.individual-item-score-stack {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.individual-item .item-score {
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
    padding: 4px 9px;
    border-radius: 999px;
}

.individual-item .item-score.is-strong,
.individual-item .item-verdict.is-strong {
    color: #166534;
    background: rgba(22, 101, 52, 0.08);
}

.individual-item .item-score.is-mid,
.individual-item .item-verdict.is-mid {
    color: #92400e;
    background: rgba(146, 64, 14, 0.08);
}

.individual-item .item-score.is-risk,
.individual-item .item-verdict.is-risk {
    color: #991b1b;
    background: rgba(153, 27, 27, 0.08);
}

.individual-item .item-score.is-neutral,
.individual-item .item-verdict.is-neutral {
    color: rgba(15, 23, 42, 0.64);
    background: rgba(15, 23, 42, 0.05);
}

.individual-item .item-verdict {
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.individual-rank-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.individual-rank-badge,
.individual-best-flag {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.individual-rank-badge.is-top {
    background: rgba(146, 64, 14, 0.08);
    color: #92400e;
}

.individual-rank-badge.is-secondary {
    background: rgba(15, 23, 42, 0.06);
    color: rgba(15, 23, 42, 0.76);
}

.individual-rank-badge.is-hold {
    background: rgba(15, 23, 42, 0.04);
    color: rgba(15, 23, 42, 0.56);
}

.individual-best-flag {
    background: rgba(146, 64, 14, 0.08);
    color: #92400e;
}

.individual-review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.review-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: rgba(15, 23, 42, 0.06);
    color: rgba(15, 23, 42, 0.72);
}

.review-meta-pill.review-meta-pill-outline {
    background: transparent;
    border: 1px solid currentColor;
}

.review-meta-pill.is-strong {
    color: #166534;
    background: rgba(22, 101, 52, 0.08);
}

.review-meta-pill.is-mid {
    color: #92400e;
    background: rgba(146, 64, 14, 0.08);
}

.review-meta-pill.is-risk {
    color: #991b1b;
    background: rgba(153, 27, 27, 0.08);
}

.review-meta-pill.is-neutral {
    color: rgba(15, 23, 42, 0.64);
    background: rgba(15, 23, 42, 0.05);
}

.individual-item.is-best-choice {
    border-color: rgba(146, 64, 14, 0.18);
    box-shadow: 0 18px 32px rgba(146, 64, 14, 0.08);
}

.individual-item .item-pros,
.individual-item .item-cons {
    margin-bottom: 8px;
    padding: 12px 12px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.75;
}

.individual-item .item-pros {
    color: #047857;
    background: rgba(16, 185, 129, 0.08);
}

.individual-item .item-cons {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.07);
}

.individual-item .label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.best-choice {
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(250,204,21,0.08));
    border-top: 1px solid rgba(245, 158, 11, 0.14);
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-action-list {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.ai-action-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.ai-action-list-index {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.ai-action-list-text {
    font-size: 13px;
    line-height: 1.75;
    color: rgba(51, 65, 85, 0.92);
}

.improvement-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.improvement-suggestions-rich {
    gap: 12px;
    padding: 18px;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(148, 163, 184, 0.12);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
}

.suggestion-item-rich {
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(245,247,250,0.94));
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.analysis-suggestion-card h4,
.analysis-review-card h4 {
    font-size: 15px;
    padding: 18px 20px;
}

.analysis-suggestion-card,
.analysis-review-card,
.analysis-card-spotlight {
    border-color: rgba(15, 23, 42, 0.08);
}

.analysis-prompts-card-rich h5,
.analysis-suggestion-card h4,
.analysis-review-card h4,
.analysis-card-spotlight h4 {
    letter-spacing: -0.02em;
}

.analysis-prompts-card-rich h5 {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.analysis-prompts-card-rich .ai-prompt-option {
    background: rgba(255,255,255,0.94);
    border-color: rgba(15, 23, 42, 0.08);
}

.suggestion-item:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.08);
}

.suggestion-item.is-applied {
    border-color: rgba(37, 99, 235, 0.18);
    background: rgba(239,246,255,0.92);
}

.suggestion-num {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.suggestion-copy {
    display: grid;
    gap: 8px;
    flex: 1;
}

.suggestion-target-row {
    display: flex;
    align-items: center;
}

.suggestion-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(51, 65, 85, 0.92);
}

.target-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    margin-right: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
}

.analysis-side-card,
.analysis-review-card,
.analysis-suggestion-card,
.analysis-prompts-card-rich {
    padding: 18px;
}

.analysis-side-card-copy {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(51, 65, 85, 0.9);
}

.ai-prompts-card {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.ai-prompts-card h5 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.ai-prompts-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.75;
    color: rgba(100, 116, 139, 0.92);
}

.ai-prompt-option {
    width: 100%;
    padding: 15px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255,255,255,0.86);
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    margin-bottom: 8px;
    line-height: 1.75;
    font-size: 13px;
}

.ai-prompt-option:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.16);
    background: rgba(239,246,255,0.92);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.06);
}

.ai-prompt-option.is-applied {
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(239,246,255,0.96);
}

.ai-collapsible-block {
    padding: 16px 18px;
}

.ai-collapsible-content {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(51, 65, 85, 0.92);
}

.ai-collapsible-content.is-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: var(--collapsed-lines, 4);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ai-collapsible-toggle {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.05);
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    transition: transform 0.18s ease, background 0.18s ease;
}

.ai-collapsible-toggle:hover {
    transform: translateY(-1px);
    background: rgba(15, 23, 42, 0.08);
}

.ai-prompt-option:last-child {
    margin-bottom: 0;
}

.ai-loading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    margin: 0;
    color: rgba(51, 65, 85, 0.92);
    font-size: 13px;
}

.ai-loading-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    line-height: 1.8;
}

.ai-loading-copy strong {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.ai-loading-copy span {
    font-size: 12px;
    color: rgba(100, 116, 139, 0.92);
}

.ai-loading-dots {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.ai-loading-dots span {
    width: 8px;
    height: 8px;
    background: #1d4ed8;
    border-radius: 999px;
    animation: loadingPulse 1.4s infinite ease-in-out both;
}

.ai-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.ai-loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes loadingPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.nav-btn.ai-active {
    background: var(--accent-gradient);
    color: #fff;
}

@media (max-width: 1180px) {
    .analysis-center-shell {
        width: min(1280px, 97vw);
        height: min(920px, 93vh);
    }

    .analysis-main-v4 {
        width: min(100%, calc(100vw - 64px));
    }

    .analysis-center-topbar {
        grid-template-columns: 1fr;
    }

    .analysis-center-session-strip {
        justify-content: flex-start;
    }

    .analysis-center-body,
    .analysis-workbench-grid,
    .ai-report-grid,
    .ai-report-grid-wide,
    .analysis-generated-board,
    .analysis-generated-hero,
    .analysis-upload-strategy-grid,
    .analysis-upload-ops-grid {
        grid-template-columns: 1fr;
    }

    .analysis-generated-hero-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analysis-center-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    }

    .analysis-lead-column,
    .analysis-side-column,
    .ai-report-lead,
    .ai-report-actions {
        position: static;
    }

    .individual-analysis-grid-rich {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .analysis-center-shell {
        inset: 0;
        width: 100vw;
        height: 100vh;
        transform: translate(0, 18px) scale(1);
    }

    .analysis-center-shell.active {
        transform: translate(0, 0) scale(1);
    }

    .analysis-center-frame,
    .analysis-center-frame-v4 {
        border-radius: 0;
    }

    .analysis-center-topbar,
    .analysis-topbar-v4,
    .analysis-center-main,
    .analysis-main-v4 {
        padding: 14px;
    }

    .analysis-center-title {
        font-size: 22px;
    }

    .analysis-entry-hero,
    .analysis-entry-board,
    .analysis-entry-hero-v4,
    .analysis-entry-context-grid,
    .analysis-panel-grid-2,
    .analysis-candidate-grid-v4,
    .analysis-followup-bar-v4,
    .analysis-command-board-v4,
    .analysis-history-layout,
    .analysis-history-preview-images {
        grid-template-columns: 1fr;
    }

    .analysis-entry-title {
        font-size: 28px;
    }

    .candidate-review-actions,
    .analysis-history-card-actions,
    .individual-item-actions {
        flex-direction: column;
    }

    .candidate-review-actions .individual-action-btn,
    .history-restore-btn,
    .history-restore-btn.secondary {
        width: 100%;
        min-width: 0;
    }

    .ai-analysis-card,
    .ai-prompts-card,
    .analysis-center-note,
    .analysis-side-card,
    .ai-summary,
    .analysis-history-list,
    .analysis-history-preview {
        border-radius: 18px;
    }
}

/* === 鐢诲竷宸ュ叿鏍?=== */
.canvas-toolbar {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-primary);
    z-index: 20;
    animation: toolbar-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toolbar-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.toolbar-icon {
    font-size: 18px;
}

.result-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.toolbar-btn:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.toolbar-btn.icon-only {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
}

/* AI 鍒嗘瀽鎸夐挳鐗规畩鏍峰紡 */
.toolbar-btn.ai-analyze {
    background: var(--accent-gradient);
    color: var(--text-inverse);
    box-shadow: var(--shadow-glow);
}

.toolbar-btn.ai-analyze:hover {
    background: var(--accent-gradient-hover);
    color: var(--text-inverse);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 28px rgba(37, 99, 235, 0.45);
}

.toolbar-btn.ai-analyze svg {
    opacity: 1;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-secondary);
}

/* === 鐢诲竷涓诲尯鍩熶紭鍖?=== */
.canvas-main {
    flex: 1;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        var(--bg-canvas);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* === 鏀硅繘鐨勫洓瀹牸缁撴灉 === */
.result-container {
    width: 100%;
    height: 100%;
    padding: 80px 40px 40px; /* 涓哄伐鍏锋爮鐣欏嚭绌洪棿 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------------------
 * Module / Results Workspace
 * --------------------------------------------------------- */

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    width: 100%;
}

/* 鏀硅繘鐨勭粨鏋滃崱鐗?*/
.result-item {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    aspect-ratio: 1;
    transform-style: flat;
}

.result-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.04),
        0 24px 48px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(37, 99, 235, 0.1);
}

.result-item.selected {
    box-shadow:
        0 0 0 3px var(--accent-primary),
        0 8px 16px rgba(37, 99, 235, 0.15),
        0 24px 48px rgba(37, 99, 235, 0.2);
    transform: translateY(-8px) scale(1.02);
}

/* 鍥剧墖瀹瑰櫒 */
.item-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.item-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-item:hover .item-image-wrapper img {
    transform: scale(1.05);
}

/* 娓愬彉閬僵 */
.item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.4) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.result-item:hover .item-overlay {
    opacity: 1;
}

/* 搴忓彿瑙掓爣 - 鏀硅繘 */
.item-index {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 3;
    transition: all 0.3s ease;
}

.result-item:hover .item-index {
    background: var(--accent-primary);
    color: var(--text-inverse);
    transform: scale(1.1);
}

.result-item.selected .item-index {
    background: var(--accent-primary);
    color: var(--text-inverse);
}

/* 閫変腑鍕鹃€夋爣璁?*/
.item-check {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--success);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    box-shadow: var(--shadow-lg);
    z-index: 3;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-item.selected .item-check {
    opacity: 1;
    transform: scale(1);
}

/* 鎿嶄綔鎸夐挳 - 鏀硅繘 */
.item-actions {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 4;
}

.result-item:hover .item-actions {
    opacity: 1;
    transform: translateY(0);
}

.result-item .action-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-item .action-btn:hover {
    background: var(--text-primary);
    color: var(--text-inverse);
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-xl);
}

.result-item .action-btn.select-btn:hover {
    background: var(--accent-primary);
}

.result-item .action-btn.download-btn:hover {
    background: var(--success);
}

.result-item .action-btn.zoom-btn:hover {
    background: var(--text-primary);
}

/* === 闅愯棌鏁板瓧瑙掓爣 === */
.item-index {
    display: none !important;
}

/* === 鍘嗗彶璁板綍椤规牱寮忓寮?=== */
.history-item-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}

.history-item-badge.generation {
    background: rgba(37, 99, 235, 0.08);
    color: rgba(37, 99, 235, 0.88);
    border-color: rgba(37, 99, 235, 0.08);
}

.history-item-badge.refinement {
    background: rgba(34, 197, 94, 0.10);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.12);
}

.history-restore-btn {
    width: 100%;
    margin-top: 16px;
    padding: 13px 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(241,245,249,0.95));
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 650;
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.history-restore-btn:hover {
    background: rgba(241,245,249,0.98);
    border-color: rgba(37, 99, 235, 0.16);
    color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
}

.history-restore-btn:focus-visible,
.prompts-list-v2 button:focus-visible,
.prompt-chip:focus-visible,
.analysis-action-btn:focus-visible,
.lightbox-action-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* === 宸ュ叿绫?=== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 1280px) {
    .analysis-center-main,
    .analysis-main-v4 {
        width: min(100%, calc(100vw - 48px));
    }

    .analysis-entry-hero-v4,
    .analysis-entry-context-grid,
    .analysis-panel-grid-2,
    .analysis-history-layout {
        grid-template-columns: 1fr;
    }

    .analysis-lane-grid-v4,
    .analysis-candidate-grid-v4,
    .candidate-review-shell {
        grid-template-columns: 1fr;
    }

    .candidate-review-media {
        border-right: none;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    }

    .analysis-lane-head {
        flex-wrap: wrap;
    }
}

@media (max-width: 900px) {
    .analysis-center-shell {
        inset: 0;
    }

    .analysis-center-frame,
    .analysis-center-frame-v4 {
        border-radius: 0;
    }

    .analysis-center-topbar,
    .analysis-topbar-v4 {
        grid-template-columns: 1fr auto;
        padding: 16px 16px 12px;
        gap: 14px;
    }

    .analysis-center-topbar-stack {
        grid-column: 1 / -1;
        justify-items: start;
        gap: 8px;
    }

    .analysis-center-main,
    .analysis-main-v4 {
        width: min(100%, calc(100vw - 24px));
        padding: 14px 0 18px;
    }

    .analysis-command-board-v4,
    .status-items-inline,
    .analysis-business-grid-inline,
    .analysis-center-followup-bar,
    .analysis-followup-bar-v4,
    .analysis-history-preview-images {
        grid-template-columns: 1fr;
    }

    .analysis-decision-bar,
    .analysis-score-grid,
    .analysis-report-generated-v4 .analysis-decision-bar {
        grid-template-columns: 1fr;
    }

    .candidate-review-head {
        grid-template-columns: 1fr;
        display: grid;
    }
}

/* === 閲嶆柊鐢熸垚閬僵灞?=== */
.regenerate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: calc(var(--sidebar-width) + 40px);
}

.regenerate-overlay.active {
    opacity: 1;
}

.regenerate-overlay.hiding {
    opacity: 0;
}

/* 鑱氬厜鐏晥鏋?- 鐓т寒渚ц竟鏍?*/
.regenerate-spotlight {
    position: fixed;
    left: 0;
    top: var(--nav-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--nav-height));
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

/* 鎻愮ず鍗＄墖 */
.regenerate-hint {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-xl);
    animation: slideInHint 0.4s ease-out;
    max-width: 360px;
}

@keyframes slideInHint {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.regenerate-hint .hint-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.regenerate-hint .hint-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.regenerate-hint .hint-text p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.regenerate-hint .hint-close-btn {
    padding: 8px 16px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.regenerate-hint .hint-close-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

/* 鎻愮ず璇嶈緭鍏ユ楂樹寒鑴夊啿鏁堟灉 */
.prompt-input.highlight-pulse {
    animation: promptPulse 520ms var(--sys-ease-out) 1;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), var(--shadow-md) !important;
}

@keyframes promptPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0), var(--shadow-md);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), var(--shadow-md);
    }
}

/* 楂樹寒蹇呭～椤规晥鏋滐紙澶嶇敤锛?*/
.highlight-required {
    animation: highlightShake 0.5s ease-in-out;
    border-color: var(--warning) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2) !important;
}

@keyframes highlightShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* === 寰皟蹇嵎寤鸿 === */
.quick-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.suggestion-chip {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.suggestion-chip:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-1px);
}

.suggestion-chip:active {
    transform: translateY(0);
}

/* ============================================
   鍝嶅簲寮忚璁?- 鍏ㄩ潰浼樺寲
   ============================================ */

/* === 澶у睆骞?(1400px+) === */
@media (min-width: 1400px) {
    .result-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === 涓ぇ灞忓箷 (1200px - 1399px) === */
@media (max-width: 1399px) {
    :root {
        --sidebar-width: 340px;
    }
}

/* === 涓瓑灞忓箷 (1024px - 1199px) === */
@media (max-width: 1199px) {
    :root {
        --sidebar-width: 320px;
    }

    .top-nav {
        padding: 0 16px;
    }

    .nav-brand {
        margin-left: 8px;
    }

    .nav-btn span {
        display: none;
    }

    .nav-btn {
        padding: 10px;
    }

    /* 缁撴灉缃戞牸 */
    .result-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }

    /* 鍒嗘瀽寮圭獥 */
    .analysis-dialog-v2 {
        width: 800px;
    }

    .result-row.three-col {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-row.three-col .result-block:last-child {
        grid-column: 1 / -1;
    }
}

/* === 骞虫澘/灏忓睆骞?(768px - 1023px) === */
@media (max-width: 1023px) {
    :root {
        --sidebar-width: 300px;
        --nav-height: 56px;
    }

    /* 瀵艰埅鏍忕揣鍑?*/
    .top-nav {
        padding: 0 12px;
    }

    .brand-text {
        font-size: 15px;
    }

    /* 渚ц竟鏍?*/
    .sidebar {
        position: fixed;
        left: 0;
        top: var(--nav-height);
        height: calc(100vh - var(--nav-height));
        z-index: 150;
        transform: translateX(0);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.collapsed {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    /* 渚ц竟鏍忔敹璧锋椂鐨勯伄缃?*/
    body.sidebar-open::after {
        content: '';
        position: fixed;
        inset: 0;
        top: var(--nav-height);
        background: rgba(0, 0, 0, 0.3);
        z-index: 140;
        opacity: 1;
        transition: opacity 0.35s ease;
        pointer-events: auto;
    }

    body::after {
        content: '';
        position: fixed;
        inset: 0;
        top: var(--nav-height);
        background: rgba(0, 0, 0, 0.3);
        z-index: -1;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease, z-index 0s 0.35s;
    }

    body.sidebar-open::after {
        z-index: 140;
        transition: opacity 0.35s ease, z-index 0s 0s;
    }

    /* 涓诲唴瀹瑰尯 */
    .canvas-main {
        margin-left: 0;
        width: 100%;
    }

    /* 鐢诲竷宸ュ叿鏍?*/
    .canvas-toolbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 16px;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
        justify-content: center;
    }

    .toolbar-btn span {
        display: none;
    }

    /* 缁撴灉缃戞牸 */
    .result-container {
        padding: 16px;
    }

    .result-grid {
        gap: 12px;
    }

    /* 鍒嗘瀽寮圭獥 */
    .analysis-dialog-v2 {
        width: calc(100vw - 32px);
        max-height: calc(100vh - 32px);
        border-radius: 16px;
    }

    .analysis-header {
        padding: 20px 24px;
    }

    .analysis-content {
        padding: 20px 24px;
    }

    .result-row.two-col,
    .result-row.three-col {
        grid-template-columns: 1fr;
    }

    .insight-grid {
        grid-template-columns: 1fr;
    }

    /* AI 设计分析中心 */
    .analysis-center-shell {
        width: min(1040px, 94vw);
    }

    /* 寰皟闈㈡澘 */
    .refine-container {
        padding: 20px;
        gap: 20px;
    }

    .refine-main-image {
        max-width: 400px;
    }

}

/* === 鎵嬫満妯睆/灏忓钩鏉?(640px - 767px) === */
@media (max-width: 767px) {
    :root {
        --sidebar-width: 100%;
        --nav-height: 52px;
    }

    /* 瀵艰埅鏍?*/
    .top-nav {
        padding: 0 10px;
    }

    .nav-brand {
        margin-left: 4px;
    }

    .brand-icon {
        font-size: 20px;
    }

    .brand-text {
        font-size: 14px;
    }

    .nav-btn.icon-btn {
        width: 40px;
        height: 40px;
    }

    /* 渚ц竟鏍忓叏灞忚鐩?*/
    .sidebar {
        width: 100%;
        border-right: none;
    }

    .sidebar-inner {
        padding: 16px;
    }

    .sidebar-section {
        margin-bottom: 16px;
    }

    /* 涓婁紶鍗＄墖 */
    .upload-card {
        padding: 16px;
        border-radius: 16px;
    }

    .upload-stack {
        gap: 12px;
    }

    .upload-slot {
        min-height: 120px;
        border-radius: 12px;
    }

    /* 鎻愮ず璇嶅崱鐗?*/
    .prompt-card {
        padding: 14px;
        border-radius: 14px;
    }

    .prompt-input {
        min-height: 100px;
        font-size: 14px;
    }

    /* 鐢熸垚鎸夐挳 */
    .generate-btn {
        padding: 14px 24px;
        border-radius: 14px;
    }

    /* 绌虹姸鎬佸搷搴斿紡 */
    .canvas-empty {
        padding: 32px 20px;
        min-height: 320px;
    }

    .empty-visual {
        width: 140px;
        height: 140px;
        margin-bottom: 32px;
    }

    .glow-ring.delay {
        inset: -18px;
    }

    .orbit-ring {
        inset: 18px;
    }

    .orbit-dot {
        width: 8px;
        height: 8px;
        top: -4px;
    }

    .center-icon {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    .center-icon svg {
        width: 28px;
        height: 28px;
    }

    .empty-title {
        font-size: 20px;
    }

    .empty-desc {
        font-size: 13px;
    }

    /* 缁撴灉缃戞牸 - 鍗曞垪 */
    .result-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .result-item {
        border-radius: 12px;
    }

    /* 鐢诲竷宸ュ叿鏍?*/
    .canvas-toolbar {
        padding: 10px 12px;
    }

    .toolbar-title span {
        font-size: 13px;
    }

    /* 鍒嗘瀽寮圭獥 */
    .analysis-dialog-v2 {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }

    .analysis-header {
        padding: 16px 20px;
    }

    .header-info h2 {
        font-size: 18px;
    }

    .analysis-content {
        padding: 16px 20px;
        max-height: calc(100vh - 120px);
    }

    .result-block {
        padding: 14px;
        border-radius: 12px;
    }

    .prompts-list-v2 .prompt-tag {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* AI 设计分析中心 - 全屏 */
    .analysis-center-shell {
        width: 100%;
        max-width: none;
    }

    .analysis-center-topbar {
        padding: 14px 16px;
    }

    .analysis-center-entry {
        padding: 0;
    }

    .analysis-status-card {
        padding: 14px;
        border-radius: 16px;
    }

    .analysis-action-btn {
        padding: 14px;
        border-radius: 16px;
    }

    /* 寰皟闈㈡澘 - 鍏ㄥ睆 */
    .refine-overlay {
        padding: 0;
    }

    .refine-container {
        padding: 16px;
        gap: 16px;
        border-radius: 0;
        height: 100vh;
        max-height: none;
    }

    .refine-close-btn {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    .refine-main-image {
        max-width: 100%;
        max-height: 40vh;
    }

    .refine-thumbnails {
        gap: 8px;
    }

    .refine-thumb-item {
        width: 52px;
        height: 52px;
    }

    .refine-input-card {
        padding: 14px;
        border-radius: 14px;
    }

    .input-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .refine-send-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    /* 鍘嗗彶寮圭獥 */
    .history-dialog {
        width: 100%;
        height: 100dvh;
        max-width: none;
        max-height: 100dvh;
        border-radius: 0;
    }

    .history-dialog .dialog-body {
        max-height: calc(100dvh - 86px);
        padding: 14px 12px 24px;
    }

    .history-summary-card {
        padding: 12px;
    }

    /* Lightbox */
    .lightbox-actions {
        bottom: max(16px, env(safe-area-inset-bottom));
        width: calc(100vw - 24px);
        padding: 12px 16px;
        gap: 12px;
    }

    .lightbox-action-btn {
        flex: 1;
        justify-content: center;
        min-height: 44px;
        padding: 10px 16px;
        font-size: 13px;
    }


    /* 鍔犺浇閬僵 */
    .loading-content p {
        font-size: 14px;
    }
}

/* === 鎵嬫満绔栧睆 (480px 浠ヤ笅) === */
@media (max-width: 479px) {
    :root {
        --nav-height: 48px;
    }

    /* 瀵艰埅鏍忔瀬绠€ */
    .top-nav {
        padding: 0 8px;
        gap: 4px;
    }

    .nav-left {
        gap: 4px;
    }

    .nav-right {
        gap: 4px;
    }

    .nav-btn.icon-btn {
        width: 36px;
        height: 36px;
    }

    .brand-text {
        font-size: 13px;
    }

    /* 渚ц竟鏍?*/
    .sidebar-inner {
        padding: 12px;
    }

    .upload-slot {
        min-height: 100px;
    }

    .placeholder-text {
        font-size: 13px;
    }

    .placeholder-hint {
        font-size: 11px;
    }

    /* 鐢诲竷鍖哄煙鏋佺畝鍝嶅簲寮?*/
    .canvas-empty {
        min-height: 280px;
        padding: 24px 16px;
    }

    .empty-visual {
        width: 110px;
        height: 110px;
        margin-bottom: 24px;
    }

    .glow-ring.delay {
        inset: -14px;
    }

    .orbit-ring {
        inset: 14px;
    }

    .orbit-dot {
        width: 6px;
        height: 6px;
        top: -3px;
    }

    .center-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .center-icon svg {
        width: 24px;
        height: 24px;
    }

    .empty-title {
        font-size: 18px;
    }

    .empty-desc {
        font-size: 12px;
    }


    /* 宸ュ叿鏍忔寜閽?*/
    .toolbar-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    /* 鍒嗘瀽寮圭獥 */
    .header-info h2 {
        font-size: 16px;
    }

    .header-subtitle {
        font-size: 12px;
    }

    .section-title {
        font-size: 13px;
    }

    .block-text {
        font-size: 13px;
    }

    /* AI 设计分析中心 */
    .analysis-center-title {
        font-size: 20px;
    }

    .analysis-center-subtitle {
        font-size: 11px;
    }

    .analysis-action-btn .action-title {
        font-size: 14px;
    }

    .analysis-action-btn .action-desc {
        font-size: 11px;
    }

    /* 寰皟闈㈡澘 */
    .input-title {
        font-size: 14px;
    }

    #refineInput {
        font-size: 14px;
    }

    .tip-item {
        font-size: 11px;
    }
}


/* === 妯睆妯″紡浼樺寲 === */
@media (max-height: 500px) and (orientation: landscape) {

    .refine-container {
        flex-direction: row;
        gap: 16px;
    }

    .refine-main-image {
        max-width: 50%;
        max-height: 80vh;
    }

    .refine-input-card {
        flex: 1;
    }
}

/* === 瑙︽懜璁惧浼樺寲 === */
@media (hover: none) and (pointer: coarse) {
    /* 澧炲ぇ鐐瑰嚮鍖哄煙 */
    .nav-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .action-btn {
        min-width: 40px;
        min-height: 40px;
    }

    .toolbar-btn {
        min-height: 40px;
        padding: 8px 14px;
    }

    /* 绉婚櫎鎮仠鏁堟灉 */
    .result-item:hover {
        transform: none;
    }

    .upload-slot:hover {
        transform: none;
        border-color: var(--border-primary);
    }

    /* 鎸変笅鏁堟灉鏇夸唬鎮仠 */
    .result-item:active {
        transform: scale(0.98);
    }

    .upload-slot:active {
        transform: scale(0.98);
        border-color: var(--accent-primary);
    }
}

/* reduced motion 规则已在后文按作用域统一定义 */

/* === 鎵撳嵃鏍峰紡 === */
@media print {
    .top-nav,
    .sidebar,
    .canvas-toolbar,
    .modal-backdrop,
    .loading-overlay {
        display: none !important;
    }

    .canvas-main {
        margin: 0;
        padding: 0;
    }

    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   澧炲己鍔ㄧ敾绯荤粺 - 娴佺晠浜や簰浣撻獙
   ============================================================ */

/* === 鐢熸垚鎸夐挳澧炲己鍔ㄧ敾 === */
.generate-btn {
    transition: background-color var(--sys-motion-fast),
                border-color var(--sys-motion-fast),
                box-shadow var(--sys-motion-base),
                transform var(--sys-motion-fast),
                opacity var(--sys-motion-fast);
}

.generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.generate-btn:active {
    transform: translateY(0) scale(0.995);
}

/* 鐢熸垚鎸夐挳鐐瑰嚮娉㈢汗鏁堟灉 */
.generate-btn::after {
    display: none;
}

.generate-btn:active::after {
    opacity: 1;
    transform: scale(2);
    transition: all 0.1s ease-out;
}

/* 鍔犺浇鐘舵€佸寮?*/
.generate-btn.loading {
    animation: none;
    opacity: 0.84;
    cursor: wait;
}

/* 鎸夐挳娑熸吉鏁堟灉 */
.generate-btn {
    position: relative;
    overflow: hidden;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-expand 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-expand {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes btn-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 4px 24px rgba(37, 99, 235, 0.3); }
}

/* === 鐢诲竷鍖哄煙鍔ㄧ敾 === */
.canvas-main {
    transition: background var(--transition-normal);
}

/* 鐢诲竷杩涘叆鍔ㄧ敾 */
.canvas-main.generating {
    animation: none;
}

@keyframes canvas-pulse {
    0%, 100% {
        background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.05) 0%, transparent 70%),
                    var(--bg-canvas);
    }
    50% {
        background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.12) 0%, transparent 60%),
                    var(--bg-canvas);
    }
}

/* 绌虹姸鎬佸懠鍚稿姩鐢诲寮?*/
.canvas-empty {
    animation: empty-fade-in 260ms var(--sys-ease-out);
    transition: opacity var(--sys-motion-base), background-color var(--sys-motion-base);
}

/* 鐢诲竷绌虹姸鎬佺敓鎴愪腑鍔ㄧ敾 */
.canvas-empty.generating {
    background: radial-gradient(circle at 50% 40%, rgba(37, 99, 235, 0.08) 0%, transparent 60%);
}

.canvas-loading-state {
    display: none;
    text-align: center;
    padding: 48px 24px;
}

.canvas-loading-state.active {
    display: block;
}

/* 鐢诲竷鍐呭姞杞藉姩鐢?- 鏇挎崲绌虹姸鎬佸唴瀹?*/
.loading-visual {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 32px;
}

.loading-rings {
    position: absolute;
    inset: 0;
}

.loading-rings .ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.loading-rings .ring-1 {
    inset: 0;
    border-color: rgba(37, 99, 235, 0.3);
    border-top-color: var(--accent-primary);
    animation: spin-ring 1.2s linear infinite;
}

.loading-rings .ring-2 {
    inset: 20px;
    border-color: rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    animation: spin-ring 1s linear infinite reverse;
}

.loading-rings .ring-3 {
    inset: 40px;
    border-color: rgba(96, 165, 250, 0.15);
    border-top-color: #60a5fa;
    animation: spin-ring 0.8s linear infinite;
}

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

.loading-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-glow 1.5s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
}

@keyframes pulse-glow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        box-shadow: 0 0 50px rgba(37, 99, 235, 0.6);
    }
}

.loading-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    animation: text-fade 2s ease-in-out infinite;
}

.loading-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

@keyframes text-fade {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* 杩涘害鏉″姩鐢?*/
.loading-progress {
    width: 200px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    width: 30%;
    background: var(--accent-gradient);
    border-radius: 2px;
    animation: progress-move 1.5s ease-in-out infinite;
}

@keyframes progress-move {
    0% {
        width: 0%;
        margin-left: 0;
    }
    50% {
        width: 60%;
        margin-left: 20%;
    }
    100% {
        width: 0%;
        margin-left: 100%;
    }
}

@keyframes empty-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === 缁撴灉缃戞牸澧炲己鍔ㄧ敾 === */
.result-container {
    animation: results-container-in 220ms var(--sys-ease-out);
}

@keyframes results-container-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 缁撴灉椤规偓鍋滃寮?*/
.result-item {
    transition: border-color var(--sys-motion-fast),
                box-shadow var(--sys-motion-base),
                transform var(--sys-motion-fast);
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--sys-shadow-card-hover);
}

.result-item:active {
    transform: none;
}

/* 鍥剧墖鍔犺浇娣″叆 */
.result-item img {
    animation: img-fade-in 260ms var(--sys-ease-out);
}

@keyframes img-fade-in {
    from {
        opacity: 0;
        transform: scale(0.985);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === 鍔犺浇瑕嗙洊灞傚寮?=== */
/* 娉ㄦ剰锛氬垵濮嬫牱寮忓湪 1695 琛屽畾涔変负 display: none */
/* 姝ゅ浠呭畾涔夎繃娓″姩鐢伙紝涓嶈鐩?display 灞炴€?*/

.loading-overlay.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

/* 鍔犺浇瑕嗙洊灞傛贰鍑哄姩鐢?*/
.loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--sys-motion-base), visibility var(--sys-motion-base);
}

/* 鍔犺浇鍐呭鍔ㄧ敾 */
.loading-content {
    animation: loading-content-in 260ms var(--sys-ease-out);
}

@keyframes loading-content-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 鍔犺浇鏂囧瓧鍔ㄧ敾 */
.loading-text {
    animation: text-shimmer 2s ease-in-out infinite;
}

@keyframes text-shimmer {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* === 渚ц竟鏍忚繃娓′紭鍖?=== */
.sidebar {
    transition: transform var(--sys-motion-dialog),
                opacity var(--sys-motion-base),
                box-shadow var(--sys-motion-base);
    will-change: transform;
}

.sidebar.collapsed {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

/* === 工具栏动画 === */
/* 注意：主要的 .canvas-toolbar 样式和动画定义在第4189行 */

/* 宸ュ叿鏍忔寜閽偓鍋?*/
.toolbar-btn {
    transition: color var(--sys-motion-fast),
                background-color var(--sys-motion-fast),
                border-color var(--sys-motion-fast),
                box-shadow var(--sys-motion-fast),
                transform var(--sys-motion-fast);
}

.toolbar-btn:hover {
    transform: none;
    box-shadow: var(--shadow-xs);
}

.toolbar-btn:active {
    transform: translateY(0) scale(0.98);
}

/* === 涓婁紶鍖哄煙鍔ㄧ敾 === */
.upload-slot {
    transition: background-color var(--sys-motion-fast),
                border-color var(--sys-motion-fast),
                box-shadow var(--sys-motion-base),
                transform var(--sys-motion-fast);
}

.upload-slot:hover {
    transform: translateY(-1px);
    border-color: var(--sys-color-border-selected);
    box-shadow: var(--sys-focus-ring);
}

.upload-slot:active {
    transform: none;
}

/* 鎷栨嫿鐘舵€?*/
.upload-slot.dragover {
    transform: translateY(-1px);
    border-color: var(--accent-primary);
    background: var(--accent-light);
    animation: none;
}

@keyframes dragover-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.2); }
    50% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
}

/* === 寰皟闈㈡澘鍔ㄧ敾 === */
.refine-overlay {
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.refine-panel,
.refine-editor-layout {
    transition: transform var(--sys-motion-dialog),
                opacity var(--sys-motion-base);
}

.refine-overlay.active .refine-panel,
.refine-overlay.active .refine-editor-layout {
    animation: panel-slide-in 260ms var(--sys-ease-spring);
}

@keyframes panel-slide-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === Toast 閫氱煡澧炲己 === */
.toast-notification {
    animation: toast-in 240ms var(--sys-ease-spring);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.toast-notification.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
    .toast-notification {
        /* Keep feedback visually detached from the floating navigation pill. */
        top: calc(82px + env(safe-area-inset-top));
        bottom: auto;
        width: calc(100vw - 28px);
        max-width: 380px;
        min-height: 48px;
        padding: 10px 14px;
        border-radius: 14px;
        font-size: 12px;
        pointer-events: none;
    }

    .toast-notification.toast-hiding {
        transform: translateX(-50%) translateY(-8px);
    }

    .toast-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .toast-message {
        max-width: none;
        line-height: 1.45;
    }

    .refine-overlay.active ~ .toast-notification {
        top: auto;
        bottom: calc(40vh + 14px);
    }
}

/* === 楠ㄦ灦灞忓姞杞芥晥鏋?=== */
.skeleton-loading {
    background: linear-gradient(90deg,
        var(--bg-tertiary) 25%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === 楂樹寒鎻愮ず鍔ㄧ敾 === */
.highlight-required {
    animation: highlight-shake 0.5s ease-in-out;
}

@keyframes highlight-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* === 缁撴灉椤逛氦閿欏叆鍦哄姩鐢?=== */
.result-item-hidden {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
}

.result-item-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 280ms var(--sys-ease-out),
                transform 300ms var(--sys-ease-spring);
}

/* 鍩轰簬 CSS 鍙橀噺鐨勪氦閿欏欢杩燂紙澶囩敤锛?*/
.result-item[style*="--item-index"] {
    transition-delay: min(calc(var(--item-index) * 50ms), 350ms);
}

/* 工具栏显示动画 */
.canvas-toolbar.toolbar-visible {
    animation: toolbar-fade-in 240ms var(--sys-ease-out) forwards;
}

@keyframes toolbar-fade-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 缁撴灉椤归€変腑鐘舵€佸寮?*/
.result-item.selected {
    transform: none;
    box-shadow: 0 0 0 2px var(--accent-primary), var(--shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* 缁撴灉椤瑰浘鐗囩缉鏀捐繃娓?*/
.result-item .item-image-wrapper img {
    transition: transform 280ms var(--sys-ease-out);
}

.result-item:hover .item-image-wrapper img {
    transform: scale(1.015);
}

/* 鎿嶄綔鎸夐挳鎮仠鍔ㄧ敾 */
.result-item .item-actions {
    transition: opacity var(--sys-motion-base), transform var(--sys-motion-base);
}

.result-item:hover .item-actions {
    transform: translateY(0);
}

.result-item .action-btn {
    transition: color var(--sys-motion-fast),
                background-color var(--sys-motion-fast),
                border-color var(--sys-motion-fast),
                transform var(--sys-motion-fast);
}

.result-item .action-btn:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.95);
}

.result-item .action-btn:active {
    transform: none;
}

/* === 局部性能优化 === */
.canvas-main,
.sidebar,
.loading-overlay,
.result-item,
.generate-btn,
.refine-overlay {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* ============================================ */
/* === 绉诲姩绔姩鐢荤畝鍖?=== */
/* ============================================ */
@media (max-width: 768px) {
    /* 鍑忓皯绮掑瓙鏁伴噺 - 闅愯棌鍚庝袱涓矑瀛?*/
    .particle.p3,
    .particle.p4 {
        display: none;
    }

    /* 闅愯棌绗笁灞傚厜鐜?*/
    .glow-ring.outer {
        display: none;
    }

    /* 绂佺敤鐢诲竷鍏夋祦鍔ㄧ敾 */
    .canvas-main::after {
        animation: none;
        display: none;
    }

    /* 绂佺敤榧犳爣璺熼殢鏁堟灉 */
    .canvas-main::before {
        display: none;
    }

    /* 绠€鍖栫矑瀛愬姩鐢绘椂闀?*/
    .particle.p1 {
        animation-duration: 5s;
    }

    .particle.p2 {
        animation-duration: 4s;
    }

    /* 鍑忓皯鍔ㄧ敾鏃堕暱 */
    :root {
        --duration-slow: 0.25s;
        --duration-slower: 0.35s;
        --duration-slowest: 0.5s;
    }
}

/* reduced motion 统一降级，避免微调弹窗与上传区动效过强 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .particle,
    .glow-ring,
    .orbit-ring,
    .canvas-main::before,
    .canvas-main::after {
        display: none !important;
    }

}

/* =========================================================
 * Batch image generation workspace
 * ========================================================= */

body.batch-modal-open {
    overflow: hidden;
}

.nav-btn.batch-active {
    color: var(--accent-primary);
    background: var(--accent-light);
}

.nav-btn.has-running-batch {
    position: relative;
}

.nav-btn.has-running-batch::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 7px;
    width: 7px;
    height: 7px;
    background: var(--accent-primary);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    animation: batch-nav-pulse 1.15s ease-in-out infinite;
}

.batch-overlay {
    position: fixed;
    inset: 0;
    z-index: 360;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.38);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.batch-overlay.active {
    opacity: 1;
    visibility: visible;
}

.batch-dialog {
    position: relative;
    width: min(1040px, calc(100vw - 48px));
    height: min(820px, calc(100dvh - 48px));
    min-height: 620px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-primary);
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
    transform: translateY(10px) scale(0.99);
    transition: transform 0.22s ease;
}

.batch-overlay.active .batch-dialog {
    transform: translateY(0) scale(1);
}

.batch-dialog-header {
    min-height: 72px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 22px 14px 24px;
    background: #fff;
    border-bottom: 1px solid #e8ebef;
}

.batch-heading {
    min-width: 0;
}

.batch-heading h2 {
    margin: 0;
    color: #172033;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.batch-heading p {
    margin: 3px 0 0;
    color: #8a94a3;
    font-size: 11px;
    line-height: 1.4;
}

.batch-header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.batch-count,
.batch-phase-chip {
    min-height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border: 1px solid #e3e7ec;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.batch-count {
    color: #475467;
    background: #fff;
}

.batch-phase-chip {
    color: #667085;
    background: #f7f8fa;
}

.batch-phase-chip.is-running {
    color: #175cd3;
    background: #eff6ff;
    border-color: #dbeafe;
}

.batch-phase-chip.is-success {
    color: #027a48;
    background: #ecfdf3;
    border-color: #d1fadf;
}

.batch-phase-chip.is-warning {
    color: #b54708;
    background: #fffaeb;
    border-color: #fef0c7;
}

.batch-close-btn {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    color: #667085;
    background: transparent;
    border: 0;
    border-radius: 8px;
    transition: color 0.16s ease, background 0.16s ease;
}

.batch-close-btn:hover,
.batch-close-btn:focus-visible {
    color: #101828;
    background: #f2f4f7;
}

.batch-dialog-body {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f7f8fa;
}

.batch-upload-section,
.batch-prompt-section,
.batch-progress-card {
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid #e3e7ec;
    border-radius: 12px;
}

.batch-upload-section,
.batch-prompt-section {
    padding: 16px;
}

.batch-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
}

.batch-section-header > div {
    min-width: 0;
}

.batch-section-header h3 {
    margin: 0;
    color: #1d2939;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.batch-section-header p {
    margin: 3px 0 0;
    color: #98a2b3;
    font-size: 10px;
    line-height: 1.45;
}

.batch-prompt-header > span {
    flex: 0 0 auto;
    color: #98a2b3;
    font-size: 10px;
}

.batch-browse-btn {
    min-height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 11px;
    color: #344054;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 650;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.batch-browse-btn:hover:not(:disabled),
.batch-browse-btn:focus-visible:not(:disabled) {
    color: #175cd3;
    background: #f8fbff;
    border-color: #84adff;
}

.batch-browse-btn:disabled {
    cursor: not-allowed;
    color: #98a2b3;
    background: #f2f4f7;
    border-color: #e4e7ec;
    box-shadow: none;
}

.batch-dropzone {
    min-height: 142px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 22px;
    color: #475467;
    background: #fafbfc;
    border: 1px dashed #cbd2dc;
    border-radius: 10px;
    cursor: pointer;
    outline: none;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.batch-dropzone:hover,
.batch-dropzone:focus-visible,
.batch-dropzone.dragging {
    background: #f8fbff;
    border-color: #84adff;
    box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.08);
}

.batch-dropzone.is-required {
    border-color: #f04438;
    box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.1);
}

.batch-dropzone.is-disabled {
    cursor: not-allowed;
    opacity: 0.58;
    box-shadow: none;
}

.batch-dropzone-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    color: #175cd3;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
}

.batch-dropzone-copy {
    min-width: 0;
}

.batch-dropzone-copy strong {
    display: block;
    color: #344054;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.batch-dropzone-copy span {
    display: block;
    margin-top: 3px;
    color: #98a2b3;
    font-size: 10px;
    line-height: 1.45;
}

.batch-task-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
    align-items: stretch;
    gap: 12px;
}

.batch-task-item {
    position: relative;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.batch-task-item:hover,
.batch-task-item:focus-within {
    border-color: #c8d0da;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.07);
    transform: translateY(-1px);
}

.batch-task-item.is-success {
    border-color: #a6f4c5;
}

.batch-task-item.is-failed {
    border-color: #fda29b;
}

.batch-task-preview {
    position: relative;
    width: 100%;
    display: block;
    overflow: hidden;
    padding: 0;
    background: #f2f4f7;
    border: 0;
    aspect-ratio: 1;
}

.batch-task-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: transparent;
    transition: background 0.16s ease;
}

.batch-task-preview:hover::after,
.batch-task-preview:focus-visible::after {
    background: rgba(16, 24, 40, 0.05);
}

.batch-task-item.status-preparing .batch-task-preview::after,
.batch-task-item.status-generating .batch-task-preview::after,
.batch-task-item.status-retrying .batch-task-preview::after {
    background: rgba(255, 255, 255, 0.44);
}

.batch-task-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.batch-task-preview:hover img {
    transform: scale(1.02);
}

.batch-task-index,
.batch-task-status {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(16, 24, 40, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.batch-task-index {
    top: 7px;
    left: 7px;
    min-width: 25px;
    height: 21px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
}

.batch-task-status {
    left: 7px;
    bottom: 7px;
    min-height: 22px;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 650;
}

.batch-task-status::before {
    content: '';
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    background: currentColor;
    border-radius: 50%;
}

.batch-task-status.is-running,
.batch-task-status.is-retrying {
    color: #175cd3;
    background: rgba(239, 246, 255, 0.94);
    border-color: #dbeafe;
}

.batch-task-status.is-running::before,
.batch-task-status.is-retrying::before {
    width: 7px;
    height: 7px;
    flex-basis: 7px;
    background: transparent;
    border: 1px solid currentColor;
    border-top-color: transparent;
    animation: batch-spin 0.75s linear infinite;
}

.batch-task-status.is-pending-retry {
    color: #b54708;
    background: rgba(255, 250, 235, 0.95);
    border-color: #fef0c7;
}

.batch-task-status.is-success {
    color: #027a48;
    background: rgba(236, 253, 243, 0.95);
    border-color: #d1fadf;
}

.batch-task-status.is-failed {
    color: #b42318;
    background: rgba(254, 243, 242, 0.95);
    border-color: #fee4e2;
}

.batch-task-copy {
    min-width: 0;
    min-height: 48px;
    padding: 8px 9px 9px;
}

.batch-task-name {
    overflow: hidden;
    color: #344054;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-task-meta {
    overflow: hidden;
    margin-top: 3px;
    color: #98a2b3;
    font-size: 9px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-task-error {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 4px;
    color: #b42318;
    font-size: 9px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.batch-remove-btn {
    position: absolute;
    z-index: 4;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: #475467;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(208, 213, 221, 0.86);
    border-radius: 7px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
    opacity: 0;
    transform: translateY(-2px);
    transition: color 0.16s ease, background 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.batch-task-item:hover .batch-remove-btn,
.batch-remove-btn:focus-visible {
    opacity: 1;
    transform: translateY(0);
}

.batch-remove-btn:hover {
    color: #b42318;
    background: #fef3f2;
    border-color: #fecdca;
}

.batch-add-tile {
    min-width: 0;
    min-height: 166px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px;
    color: #667085;
    background: #fafbfc;
    border: 1px dashed #cbd2dc;
    border-radius: 10px;
    transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.batch-add-tile:hover,
.batch-add-tile:focus-visible {
    color: #175cd3;
    background: #f8fbff;
    border-color: #84adff;
}

.batch-add-tile-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: inherit;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 9px;
}

.batch-add-tile strong {
    color: inherit;
    font-size: 10px;
    font-weight: 650;
}

.batch-add-tile > span:last-child {
    color: #98a2b3;
    font-size: 9px;
}

.batch-prompt-section textarea {
    width: 100%;
    min-height: 104px;
    display: block;
    resize: vertical;
    padding: 11px 12px;
    color: #1d2939;
    background: #fafbfc;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    font: inherit;
    font-size: 12px;
    line-height: 1.6;
    outline: none;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.batch-prompt-section textarea:hover:not(:disabled) {
    border-color: #98a2b3;
}

.batch-prompt-section textarea:focus {
    background: #fff;
    border-color: #84adff;
    box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.09);
}

.batch-prompt-section textarea.is-required {
    border-color: #f04438;
    box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.1);
}

.batch-prompt-section textarea:disabled {
    cursor: not-allowed;
    color: #667085;
    background: #f2f4f7;
    border-color: #e4e7ec;
}

.batch-prompt-hint {
    margin-top: 7px;
    color: #98a2b3;
    font-size: 9px;
    line-height: 1.45;
}

.batch-progress-card {
    padding: 12px 14px;
}

.batch-progress-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 9px;
}

.batch-progress-copy > div {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.batch-progress-copy strong {
    color: #344054;
    font-size: 11px;
    font-weight: 650;
}

.batch-progress-copy span {
    overflow: hidden;
    color: #98a2b3;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-archive-status {
    flex: 0 0 auto;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 9px !important;
    font-weight: 650;
}

.batch-archive-status:empty {
    display: none;
}

.batch-archive-status.is-saving {
    color: #175cd3;
    background: #eff6ff;
}

.batch-archive-status.is-saved {
    color: #027a48;
    background: #ecfdf3;
}

.batch-archive-status.is-failed {
    color: #b42318;
    background: #fef3f2;
}

.batch-progress-track {
    height: 4px;
    overflow: hidden;
    background: #eaecf0;
    border-radius: 999px;
}

.batch-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--accent-primary);
    border-radius: inherit;
    transition: width 0.22s ease;
}

.batch-dialog-footer {
    min-height: 68px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 20px 12px 24px;
    background: #fff;
    border-top: 1px solid #e8ebef;
}

.batch-footer-summary {
    min-width: 0;
    overflow: hidden;
    color: #667085;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-footer-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.batch-secondary-btn,
.batch-download-btn,
.batch-primary-btn,
.batch-danger-btn {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 650;
    transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.batch-secondary-btn,
.batch-download-btn {
    color: #344054;
    background: #fff;
    border: 1px solid #d0d5dd;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.batch-secondary-btn:hover:not(:disabled),
.batch-download-btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #98a2b3;
}

.batch-primary-btn {
    color: #fff;
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.batch-primary-btn:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.batch-danger-btn {
    color: #fff;
    background: #d92d20;
    border: 1px solid #d92d20;
}

.batch-danger-btn:hover:not(:disabled) {
    background: #b42318;
    border-color: #b42318;
}

.batch-secondary-btn:disabled,
.batch-download-btn:disabled,
.batch-primary-btn:disabled,
.batch-danger-btn:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    box-shadow: none;
}

.batch-reset-confirm {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.3);
    opacity: 0;
    transition: opacity 0.16s ease;
}

.batch-reset-confirm.active {
    opacity: 1;
}

.batch-reset-confirm-card {
    width: min(430px, 100%);
    padding: 20px;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(16, 24, 40, 0.2);
}

.batch-reset-confirm-copy strong {
    display: block;
    color: #1d2939;
    font-size: 14px;
    font-weight: 700;
}

.batch-reset-confirm-copy span {
    display: block;
    margin-top: 7px;
    color: #667085;
    font-size: 11px;
    line-height: 1.6;
}

.batch-reset-confirm-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.batch-overlay [hidden] {
    display: none !important;
}

@keyframes batch-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes batch-nav-pulse {
    0%, 100% {
        transform: scale(0.86);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
        opacity: 0.72;
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.04);
        opacity: 1;
    }
}

@media (hover: none), (pointer: coarse) {
    .batch-remove-btn {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 800px) {
    .batch-overlay {
        padding: 0;
    }

    .batch-dialog {
        width: 100vw;
        height: 100dvh;
        min-height: 0;
        border: 0;
        border-radius: 0;
    }

    .batch-dialog-header {
        min-height: 64px;
        padding: 12px 14px 12px 16px;
    }

    .batch-dialog-body {
        padding: 14px;
    }

    .batch-task-list {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        gap: 10px;
    }

    .batch-dialog-footer {
        padding: 10px 14px;
    }
}

@media (max-width: 560px) {
    .batch-heading p {
        display: none;
    }

    .batch-header-actions {
        gap: 5px;
    }

    .batch-phase-chip {
        display: inline-flex;
        max-width: 92px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .batch-dialog-body {
        gap: 10px;
        padding: 10px;
    }

    .batch-upload-section,
    .batch-prompt-section {
        padding: 13px;
    }

    .batch-section-header {
        gap: 10px;
        margin-bottom: 11px;
    }

    .batch-section-header p {
        max-width: 220px;
    }

    .batch-dropzone {
        min-height: 132px;
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 18px;
    }

    .batch-task-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .batch-task-copy {
        min-height: 45px;
        padding: 7px 8px 8px;
    }

    .batch-add-tile {
        min-height: 146px;
    }

    .batch-prompt-section textarea {
        min-height: 112px;
        resize: none;
    }

    .batch-progress-copy {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .batch-progress-copy > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .batch-progress-copy span {
        white-space: normal;
    }

    .batch-dialog-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
    }

    .batch-footer-summary {
        display: none;
    }

    .batch-footer-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .batch-footer-actions > button {
        width: 100%;
    }

    .batch-footer-actions:not(:has(.batch-download-btn:not([hidden]))) .batch-secondary-btn:not([hidden]) {
        grid-column: 1 / -1;
    }

    .batch-primary-btn {
        grid-column: 1 / -1;
    }

    .batch-reset-confirm {
        align-items: flex-end;
        padding: 12px;
    }

    .batch-reset-confirm-card {
        padding: 18px;
        border-radius: 14px;
    }
}

@media (max-width: 380px) {
    .batch-count {
        display: none;
    }

    .batch-section-header {
        align-items: flex-start;
    }

    .batch-browse-btn {
        padding-inline: 9px;
    }

    .batch-task-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
/* =========================================================
 * Layer 05 / White rounded creative studio
 * 2026-07-22 full workspace reconstruction
 * This is the authoritative frontend theme layer.
 * ========================================================= */

.soft-workbench {
    position: relative;
    isolation: isolate;
    color: var(--text-primary);
    background: linear-gradient(180deg, #f8f9fb 0%, var(--sys-color-page) 38%, #f1f3f6 100%);
}

.soft-workbench::before {
    content: none;
}

.soft-workbench *,
.soft-workbench *::before,
.soft-workbench *::after {
    scrollbar-width: thin;
    scrollbar-color: #c5ced9 transparent;
}

.soft-workbench *::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.soft-workbench *::-webkit-scrollbar-track {
    background: transparent;
}

.soft-workbench *::-webkit-scrollbar-thumb {
    min-height: 36px;
    background: #c5ced9;
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

.soft-workbench *::-webkit-scrollbar-thumb:hover {
    background: #aeb9c8;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.soft-workbench *::-webkit-scrollbar-button,
.soft-workbench *::-webkit-scrollbar-corner {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
}

.soft-workbench textarea {
    resize: none;
}

.soft-workbench input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.soft-workbench input[type="number"]::-webkit-inner-spin-button,
.soft-workbench input[type="number"]::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.soft-workbench select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 42px;
}

.soft-workbench button,
.soft-workbench a,
.soft-workbench input,
.soft-workbench textarea,
.soft-workbench select,
.soft-workbench [role="button"] {
    -webkit-tap-highlight-color: transparent;
}

.soft-workbench button:focus-visible,
.soft-workbench a:focus-visible,
.soft-workbench input:focus-visible,
.soft-workbench textarea:focus-visible,
.soft-workbench select:focus-visible,
.soft-workbench [role="button"]:focus-visible {
    outline: none;
    box-shadow: var(--sys-focus-ring);
}

/* Top navigation */

html,
body.soft-workbench {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

body.soft-workbench {
    --workbench-edge-x: 24px;
    --workbench-nav-top: 18px;
    --workbench-nav-height: 72px;
    --workbench-nav-gap: 20px;
    --workbench-bottom: 18px;
    --sidebar-width: 360px;
    --sidebar-upload-size: clamp(96px, calc((100dvh - 460px) / 2), 306px);
    position: fixed;
    inset: 0;
    min-width: 0;
    min-height: 0;
}

.soft-workbench .top-nav {
    top: var(--workbench-nav-top);
    right: var(--workbench-edge-x);
    left: var(--workbench-edge-x);
    height: var(--workbench-nav-height);
    padding: 0 20px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 22px;
    box-shadow: var(--sys-shadow-panel);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: soft-nav-arrive 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.soft-workbench .nav-left,
.soft-workbench .nav-right {
    gap: 7px;
}

.soft-workbench .nav-left {
    min-width: 0;
    flex: 0 1 auto;
}

.soft-workbench .nav-right {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}

.soft-workbench .nav-right::-webkit-scrollbar {
    display: none;
}

.soft-workbench .nav-brand {
    gap: 8px;
    margin-left: 10px;
}

.soft-workbench .brand-mark {
    display: none;
    place-items: center;
    color: #fff;
    background: var(--accent-primary);
    border-radius: 11px;
    box-shadow: 0 5px 12px rgba(63, 111, 243, 0.18);
}

.soft-workbench .brand-text {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 720;
    letter-spacing: -0.6px;
}

.soft-workbench .nav-btn {
    min-height: 42px;
    padding: 0 13px;
    gap: 8px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: none;
    font-size: 13px;
    font-weight: 600;
    transition:
        color var(--sys-motion-fast),
        background-color var(--sys-motion-fast),
        border-color var(--sys-motion-fast),
        transform var(--sys-motion-fast);
}

.soft-workbench .nav-btn:hover {
    color: var(--text-primary);
    background: var(--sys-color-surface-hover);
    border-color: transparent;
    box-shadow: 0 7px 16px rgba(31, 45, 72, 0.06);
    transform: translateY(-1px);
}

.soft-workbench .nav-btn:active {
    transform: translateY(0) scale(0.98);
}

.soft-workbench .nav-btn svg {
    transition: transform var(--sys-motion-fast), color var(--sys-motion-fast);
}

.soft-workbench .nav-btn:hover svg {
    transform: translateY(-1px) scale(1.06);
}

.soft-workbench .nav-btn.ai-active,
.soft-workbench .nav-btn.batch-active,
.soft-workbench .nav-btn.history-active,
.soft-workbench .nav-btn.refine-active {
    color: var(--accent-primary);
    background: var(--sys-color-primary-soft);
    border-color: rgba(63, 111, 243, 0.12);
    box-shadow: none;
}

.soft-workbench .nav-btn.icon-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
}

/* Main workspace */

.soft-workbench .app-layout {
    position: fixed;
    top: calc(var(--workbench-nav-top) + var(--workbench-nav-height) + var(--workbench-nav-gap));
    right: var(--workbench-edge-x);
    bottom: var(--workbench-bottom);
    left: var(--workbench-edge-x);
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    gap: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 28px;
    box-shadow: var(--sys-shadow-panel);
    animation: soft-workspace-arrive 620ms cubic-bezier(0.2, 0.8, 0.2, 1) 60ms both;
}

.soft-workbench .sidebar,
.soft-workbench .canvas-main {
    min-height: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.soft-workbench .sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    background: #fbfbfc;
    border-right: 1px solid var(--sys-color-border);
    transition:
        width var(--sys-motion-dialog),
        flex-basis var(--sys-motion-dialog),
        transform var(--sys-motion-dialog),
        opacity var(--sys-motion-base);
}

.soft-workbench .sidebar.collapsed {
    width: 0;
    flex-basis: 0;
    border: 0;
    opacity: 0;
}

.soft-workbench .sidebar-inner {
    width: var(--sidebar-width);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.soft-workbench .sidebar-scroll {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: hidden;
    overscroll-behavior: none;
    scrollbar-gutter: auto;
}

.soft-workbench .sidebar-intro {
    display: block;
    flex: 0 0 auto;
    padding: clamp(12px, 2.6dvh, 28px) 30px clamp(6px, 1.2dvh, 13px);
    background: #fbfbfc;
}

.soft-workbench .sidebar-eyebrow {
    display: inline;
    min-height: 0;
    padding: 0;
    color: var(--accent-primary);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.soft-workbench .sidebar-intro h1 {
    margin: 0 0 4px;
    color: var(--text-primary);
    font-size: clamp(16px, 2dvh, 20px);
    line-height: 1.35;
    letter-spacing: -0.035em;
}

.soft-workbench .sidebar-intro p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.55;
}

.soft-workbench .sidebar-section {
    flex: 0 0 auto;
    padding: clamp(5px, 1dvh, 10px) 16px;
}

.soft-workbench .sidebar-section:first-of-type {
    padding-top: 8px;
}

.soft-workbench .sidebar-section:last-of-type {
    padding-top: 6px;
    padding-bottom: 6px;
}

.soft-workbench .sidebar-section:first-of-type .sidebar-section-heading {
    display: none;
}

.soft-workbench .sidebar-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 11px;
}

.soft-workbench .sidebar-section-heading strong {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 650;
}

.soft-workbench .sidebar-section-heading span {
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 400;
}

.soft-workbench .upload-card,
.soft-workbench .prompt-card {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.soft-workbench .upload-card {
    position: relative;
}

.soft-workbench .upload-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(8px, 1.2dvh, 13px);
}

.soft-workbench .upload-field {
    min-width: 0;
    display: grid;
    gap: 0;
}

.soft-workbench .slot-label {
    position: static;
    z-index: auto;
    width: auto;
    min-height: 20px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 0;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 13px;
    font-weight: 600;
}

.soft-workbench .slot-label .label-dot {
    display: none;
}

.soft-workbench .field-optional,
.soft-workbench .field-required {
    font-size: 10px;
    font-weight: 500;
}

.soft-workbench .field-optional {
    color: var(--text-tertiary);
}

.soft-workbench .field-required {
    color: var(--sys-color-danger);
}

.soft-workbench .upload-slot {
    min-width: 0;
    width: min(calc(100% - 4px), var(--sidebar-upload-size));
    max-width: var(--sidebar-upload-size);
    height: var(--sidebar-upload-size);
    min-height: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid #dce3ed;
    border-radius: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 6px 18px rgba(31, 45, 72, 0.025);
    transform: none;
    justify-self: center;
    transition:
        background-color var(--sys-motion-fast),
        border-color var(--sys-motion-fast),
        box-shadow var(--sys-motion-fast),
        transform var(--sys-motion-fast);
}

.soft-workbench .upload-slot.primary {
    background:
        radial-gradient(circle at 50% 38%, rgba(80, 125, 246, 0.1), transparent 43%),
        linear-gradient(180deg, #fbfdff 0%, #f4f7ff 100%);
    border: 2px dashed #7f9ff2;
    box-shadow:
        inset 0 0 0 4px rgba(81, 124, 243, 0.045),
        0 8px 22px rgba(57, 91, 171, 0.055);
}

.soft-workbench .upload-slot.primary:not(.has-file) .slot-content::before,
.soft-workbench .upload-slot.primary:not(.has-file) .slot-content::after {
    content: '';
    position: absolute;
    z-index: 2;
    width: 18px;
    height: 18px;
    pointer-events: none;
    opacity: 0.58;
}

.soft-workbench .upload-slot.primary:not(.has-file) .slot-content::before {
    top: 10px;
    left: 10px;
    border-top: 2px solid #6e91ef;
    border-left: 2px solid #6e91ef;
    border-radius: 7px 0 0;
}

.soft-workbench .upload-slot.primary:not(.has-file) .slot-content::after {
    right: 10px;
    bottom: 10px;
    border-right: 2px solid #6e91ef;
    border-bottom: 2px solid #6e91ef;
    border-radius: 0 0 7px;
}

.soft-workbench .upload-slot.primary.has-file {
    border: 1px solid var(--sys-color-border);
}

.soft-workbench .upload-slot:hover,
.soft-workbench .upload-slot.primary:hover {
    background: var(--sys-color-surface-subtle);
    border-color: #aebddd;
    box-shadow: 0 12px 28px rgba(44, 68, 112, 0.07);
    transform: translateY(-2px);
}

.soft-workbench .upload-slot.primary:hover {
    background:
        radial-gradient(circle at 50% 38%, rgba(80, 125, 246, 0.14), transparent 45%),
        linear-gradient(180deg, #fbfdff 0%, #edf3ff 100%);
    border-color: #5f84ed;
    box-shadow:
        inset 0 0 0 4px rgba(81, 124, 243, 0.06),
        0 12px 28px rgba(57, 91, 171, 0.09);
}

.soft-workbench .upload-slot:focus-visible,
.soft-workbench .upload-slot.dragging {
    background: var(--sys-color-primary-soft);
    border-color: var(--accent-primary);
    box-shadow: var(--sys-focus-ring);
    transform: none;
}

.soft-workbench .slot-placeholder {
    gap: clamp(4px, 0.7dvh, 7px);
    padding: clamp(8px, 2dvh, 24px);
    color: var(--text-secondary);
}

.soft-workbench .placeholder-icon {
    width: clamp(34px, 6dvh, 58px);
    height: clamp(34px, 6dvh, 58px);
    color: var(--accent-primary);
    background: var(--sys-color-primary-soft);
    border: 1px solid #dce5ff;
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(71, 115, 244, 0.08);
    opacity: 1;
}

.soft-workbench .placeholder-icon svg {
    width: clamp(22px, 3.8dvh, 36px);
    height: clamp(22px, 3.8dvh, 36px);
}

.soft-workbench .upload-slot:hover .placeholder-icon,
.soft-workbench .upload-slot.dragging .placeholder-icon {
    color: var(--accent-primary);
    background: #e8efff;
    transform: translateY(-2px) scale(1.025);
}

.soft-workbench .placeholder-text {
    color: var(--text-secondary);
    font-size: clamp(11px, 1.4dvh, 14px);
    font-weight: 600;
}

.soft-workbench .placeholder-hint {
    max-width: none;
    color: var(--text-tertiary);
    font-size: 11px;
    line-height: 1.45;
}

.soft-workbench .slot-preview {
    padding: 0;
    object-fit: contain;
    background: var(--sys-color-surface-subtle);
    border-radius: 21px;
}

.soft-workbench .upload-slot.has-file {
    background: var(--sys-color-surface-subtle);
    border: 1px solid var(--sys-color-border);
    box-shadow: none;
}

.soft-workbench .upload-slot.has-file:hover {
    border-color: var(--sys-color-border-hover);
    box-shadow: none;
    transform: none;
}

.soft-workbench .upload-clear-btn {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--sys-color-border);
    border-radius: 11px;
    box-shadow: var(--sys-shadow-xs);
    transform: translateY(-3px);
}

.soft-workbench .upload-slot.has-file:hover .upload-clear-btn,
.soft-workbench .upload-slot.has-file:focus-within .upload-clear-btn,
.soft-workbench .upload-slot.has-file .upload-clear-btn:focus-visible {
    transform: translateY(0);
}

.soft-workbench .ai-analyze-btn {
    position: absolute;
    z-index: 5;
    right: max(10px, calc((100% - var(--sidebar-upload-size)) / 2 + 10px));
    bottom: 10px;
    width: auto;
    min-height: 36px;
    margin: 0;
    padding: 0 12px;
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #d7e1ff;
    border-radius: 11px;
    box-shadow: 0 8px 20px rgba(42, 78, 169, 0.13);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.soft-workbench .ai-analyze-btn:hover {
    color: var(--accent-primary);
    background: var(--sys-color-primary-soft);
    box-shadow: none;
    transform: none;
}

.soft-workbench .prompt-card {
    display: grid;
    gap: 8px;
}

.soft-workbench .prompt-field {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.soft-workbench .field-label {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.soft-workbench .temperature-field {
    position: relative;
    gap: 7px;
    padding: 10px 12px 9px;
    overflow: hidden;
    background: linear-gradient(135deg, #fbfcff 0%, #f5f7fb 100%);
    border: 1px solid #dce3ed;
    border-radius: 17px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
    transition: border-color var(--sys-motion-fast), background-color var(--sys-motion-fast), box-shadow var(--sys-motion-fast);
}

.soft-workbench .temperature-field::after {
    position: absolute;
    top: -34px;
    right: -30px;
    width: 92px;
    height: 72px;
    content: '';
    pointer-events: none;
    background: radial-gradient(circle, rgba(88, 119, 204, 0.09), transparent 68%);
}

.soft-workbench .temperature-field > * {
    position: relative;
    z-index: 1;
}

.soft-workbench .temperature-field.is-overridden {
    background: linear-gradient(135deg, #f9fbff 0%, #f1f5ff 100%);
    border-color: #c6d3f4;
    box-shadow: 0 0 0 3px rgba(63, 102, 220, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.soft-workbench .temperature-field.is-unsupported {
    opacity: 0.7;
}

.soft-workbench .temperature-heading,
.soft-workbench .temperature-foot {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.soft-workbench .temperature-title {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.soft-workbench .temperature-title small {
    display: none;
    color: var(--text-tertiary);
    font-size: 10px;
    line-height: 1.25;
}

.soft-workbench .temperature-heading output {
    flex: 0 0 auto;
    padding: 3px 9px;
    color: #3857a6;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #d5deee;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.soft-workbench .temperature-slider-row {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
}

.soft-workbench .temperature-slider-row > span {
    color: #667386;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.soft-workbench .temperature-slider {
    --temperature-progress: 50%;
    width: 100%;
    height: 22px;
    min-width: 0;
    margin: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: ew-resize;
}

.soft-workbench .temperature-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: linear-gradient(90deg, #4f6cc2 0 var(--temperature-progress), #d5dce7 var(--temperature-progress) 100%);
    border-radius: 999px;
}

.soft-workbench .temperature-slider::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    margin-top: -6px;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 4px solid #4f6cc2;
    border-radius: 50%;
    box-shadow: 0 2px 7px rgba(45, 64, 104, 0.16);
    transition: border-color var(--sys-motion-fast), box-shadow var(--sys-motion-fast), transform var(--sys-motion-fast);
}

.soft-workbench .temperature-slider::-moz-range-track {
    height: 4px;
    background: #d5dce7;
    border-radius: 999px;
}

.soft-workbench .temperature-slider::-moz-range-progress {
    height: 4px;
    background: #4f6cc2;
    border-radius: 999px;
}

.soft-workbench .temperature-slider::-moz-range-thumb {
    width: 8px;
    height: 8px;
    background: #fff;
    border: 4px solid #4f6cc2;
    border-radius: 50%;
    box-shadow: 0 2px 7px rgba(45, 64, 104, 0.16);
}

.soft-workbench .temperature-slider:hover::-webkit-slider-thumb {
    border-color: #3f5eb7;
    box-shadow: 0 3px 10px rgba(45, 64, 104, 0.2);
    transform: scale(1.06);
}

.soft-workbench .temperature-slider:focus-visible {
    box-shadow: none;
}

.soft-workbench .temperature-slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(71, 115, 244, 0.15), 0 2px 7px rgba(45, 64, 104, 0.16);
}

.soft-workbench .temperature-foot small {
    min-width: 0;
    overflow: hidden;
    color: #566579;
    font-size: 11px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.soft-workbench .temperature-foot button {
    flex: 0 0 auto;
    padding: 2px 0;
    color: #405fae;
    background: transparent;
    border: 0;
    font-size: 11px;
    font-weight: 620;
}

.soft-workbench .temperature-foot button:hover {
    color: #2f4e9c;
}

.soft-workbench .temperature-foot button[hidden] {
    display: none;
}

@media (min-height: 901px) {
    .soft-workbench .temperature-title small {
        display: block;
    }
}

.soft-workbench .prompt-input-wrap {
    position: relative;
}

.soft-workbench .prompt-select,
.soft-workbench .prompt-input,
.soft-workbench .batch-prompt-section textarea,
.soft-workbench .refine-textarea,
.soft-workbench .popup-textarea,
.soft-workbench .analysis-center-followup-input {
    width: 100%;
    color: var(--text-primary);
    background-color: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 15px;
    box-shadow: inset 0 1px 2px rgba(23, 32, 51, 0.018);
    transition:
        background-color var(--sys-motion-fast),
        border-color var(--sys-motion-fast),
        box-shadow var(--sys-motion-fast);
}

.soft-workbench .prompt-select {
    min-height: clamp(42px, 4.3dvh, 46px);
    padding: 0 42px 0 14px;
}

.soft-workbench .prompt-input {
    height: clamp(92px, 10.8dvh, 120px);
    min-height: 92px;
    max-height: 120px;
    margin: 0;
    padding: 13px 14px 32px;
    line-height: 1.6;
    resize: none;
}

.soft-workbench .prompt-select:hover,
.soft-workbench .prompt-input:hover,
.soft-workbench .batch-prompt-section textarea:hover:not(:disabled),
.soft-workbench .refine-textarea:hover {
    border-color: var(--sys-color-border-strong);
}

.soft-workbench .prompt-select:focus,
.soft-workbench .prompt-input:focus,
.soft-workbench .batch-prompt-section textarea:focus,
.soft-workbench .refine-textarea:focus,
.soft-workbench .popup-textarea:focus,
.soft-workbench .analysis-center-followup-input:focus {
    background-color: #fff;
    border-color: var(--accent-primary);
    box-shadow: var(--sys-focus-ring);
}

.soft-workbench .prompt-char-count {
    position: absolute;
    right: 12px;
    bottom: 9px;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.92);
    font-size: 10px;
    line-height: 1;
    pointer-events: none;
}

.soft-workbench .sidebar-footer {
    position: static;
    z-index: 3;
    flex: 0 0 auto;
    margin: 0;
    padding: clamp(7px, 1dvh, 11px) 16px clamp(9px, 1.2dvh, 13px);
    background: rgba(251, 251, 252, 0.98);
    border-top: 1px solid var(--sys-color-border);
    box-shadow: 0 -10px 24px rgba(27, 39, 65, 0.025);
}

.soft-workbench .generate-btn {
    min-height: clamp(44px, 4.5dvh, 48px);
    color: #fff;
    background: linear-gradient(180deg, #4b78f3 0%, #3f6ff3 100%);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(71, 115, 244, 0.18);
}

.soft-workbench .generate-btn::after {
    content: '';
    position: absolute;
    top: -70%;
    bottom: -70%;
    left: -34%;
    width: 25%;
    display: block;
    opacity: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    pointer-events: none;
    transform: skewX(-18deg) translateX(0);
}

.soft-workbench .generate-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #5684ff 0%, #3565e8 100%);
    box-shadow: 0 13px 28px rgba(49, 94, 219, 0.25);
    transform: translateY(-2px);
}

.soft-workbench .generate-btn:hover:not(:disabled)::after {
    opacity: 1;
    transform: skewX(-18deg) translateX(620%);
    transition: transform 760ms ease, opacity 160ms ease;
}

.soft-workbench .generate-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.985);
}

/* Canvas and results */

.soft-workbench .canvas-main {
    align-items: stretch;
    justify-content: stretch;
    background: #fff;
}

.soft-workbench .canvas-main::before,
.soft-workbench .canvas-main::after {
    display: none;
    animation: none;
}

.soft-workbench .canvas-toolbar {
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    min-height: 78px;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 30px;
    transform: none;
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--sys-color-border);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: none;
}

.soft-workbench .canvas-toolbar.toolbar-visible {
    transform: none;
}

.soft-workbench .toolbar-title {
    gap: 9px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 650;
}

.soft-workbench .toolbar-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--accent-primary);
    background: var(--sys-color-primary-soft);
    border: 0;
    border-radius: 12px;
    box-shadow: none;
}

.soft-workbench .result-count,
.soft-workbench .result-intro > span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    color: var(--accent-primary);
    background: var(--sys-color-primary-soft);
    border: 0;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 650;
}

.soft-workbench .toolbar-right {
    gap: 8px;
}

.soft-workbench .toolbar-btn {
    min-height: 44px;
    padding: 0 14px;
    gap: 6px;
    color: var(--text-secondary);
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 12px;
    box-shadow: none;
    font-size: 12px;
    font-weight: 600;
}

.soft-workbench .toolbar-btn:hover,
.soft-workbench .toolbar-btn.ai-analyze:hover {
    color: var(--text-primary);
    background: var(--sys-color-surface-hover);
    border-color: var(--sys-color-border-strong);
    box-shadow: var(--sys-shadow-xs);
    transform: translateY(-1px);
}

.soft-workbench .toolbar-btn.ai-analyze {
    color: var(--accent-primary);
    background: #fff;
    border-color: #cbd7fb;
    box-shadow: none;
}

.soft-workbench .canvas-empty,
.soft-workbench .canvas-loading-state {
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 34px;
    background: #fff;
}

.soft-workbench .empty-content {
    width: min(880px, 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    padding: 12px 24px 20px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.soft-workbench .empty-motion-stage {
    position: relative;
    width: min(590px, 100%);
    height: clamp(260px, 40dvh, 380px);
    flex: 0 0 auto;
    isolation: isolate;
    overflow: hidden;
    border-radius: 44% 56% 50% 50%;
    perspective: 900px;
}

.soft-workbench .empty-motion-stage::before,
.soft-workbench .empty-motion-stage::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.soft-workbench .empty-motion-stage::before {
    z-index: 0;
    inset: 11% 19%;
    opacity: 0.68;
    background:
        conic-gradient(from 20deg, transparent 0 12%, rgba(75, 126, 249, 0.24) 18%, transparent 28% 53%, rgba(70, 214, 235, 0.2) 64%, transparent 76%),
        radial-gradient(circle, rgba(84, 134, 255, 0.12), transparent 68%);
    border-radius: 50%;
    filter: blur(12px);
    animation: ai-nebula-turn 13s linear infinite;
}

.soft-workbench .empty-motion-stage::after {
    z-index: 4;
    inset: 18% 28%;
    opacity: 0.42;
    background: conic-gradient(from 0deg, transparent 0 72%, rgba(76, 129, 255, 0.62) 80%, rgba(73, 221, 235, 0.72) 88%, transparent 96%);
    border-radius: 50%;
    -webkit-mask: radial-gradient(circle, transparent 57%, #000 59% 61%, transparent 63%);
    mask: radial-gradient(circle, transparent 57%, #000 59% 61%, transparent 63%);
    animation: ai-signal-sweep 6.5s linear infinite reverse;
}

.soft-workbench .ai-grid-plane {
    z-index: 0;
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -22%;
    height: 64%;
    opacity: 0.5;
    background-image:
        linear-gradient(rgba(78, 122, 248, 0.13) 1px, transparent 1px),
        linear-gradient(90deg, rgba(78, 122, 248, 0.13) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to top, transparent 3%, #000 44%, transparent 96%);
    transform: rotateX(65deg) scale(1.18);
    transform-origin: center bottom;
    animation: ai-grid-drift 7s linear infinite;
}

.soft-workbench .ai-ambient-glow {
    z-index: 1;
    position: absolute;
    inset: 14% 22% 9%;
    background: radial-gradient(circle, rgba(85, 141, 255, 0.21) 0%, rgba(92, 218, 242, 0.09) 38%, transparent 72%);
    filter: blur(10px);
    animation: ai-ambient-pulse 3.8s ease-in-out infinite;
}

.soft-workbench .ai-vision-core {
    z-index: 3;
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(126px, 18dvh, 174px);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    border-radius: 38%;
    transform: translate(-50%, -50%) rotate(45deg);
    animation: ai-core-hover 4.6s ease-in-out infinite;
    will-change: transform;
}

.soft-workbench .ai-vision-core-halo,
.soft-workbench .ai-vision-core-ring,
.soft-workbench .ai-vision-core-chip {
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.soft-workbench .ai-vision-core-halo {
    background: conic-gradient(from 90deg, rgba(70, 111, 246, 0), rgba(70, 111, 246, 0.38), rgba(74, 213, 232, 0.42), rgba(70, 111, 246, 0));
    filter: blur(15px);
    opacity: 0.58;
    animation: ai-core-spin 8s linear infinite;
}

.soft-workbench .ai-vision-core-ring {
    inset: 7%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(238, 245, 255, 0.76));
    border: 1px solid rgba(74, 117, 241, 0.2);
    box-shadow: 0 22px 60px rgba(55, 91, 175, 0.17), inset 0 0 0 9px rgba(255, 255, 255, 0.62);
    animation: ai-core-ring-pulse 3.2s ease-in-out infinite;
}

.soft-workbench .ai-vision-core-chip {
    inset: 24%;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #4674f4;
    background: linear-gradient(145deg, #fff, #eaf2ff);
    border: 1px solid rgba(74, 117, 241, 0.2);
    box-shadow: 0 10px 28px rgba(58, 97, 190, 0.18);
}

.soft-workbench .ai-vision-core-chip::after {
    content: '';
    position: absolute;
    top: -35%;
    bottom: -35%;
    left: -80%;
    width: 38%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
    transform: skewX(-18deg);
    animation: ai-chip-glint 3.6s ease-in-out infinite;
}

.soft-workbench .ai-vision-core-chip svg {
    width: 58%;
    height: 58%;
    transform: rotate(-45deg);
    filter: drop-shadow(0 5px 9px rgba(70, 116, 244, 0.2));
}

.soft-workbench .ai-scan-line {
    position: absolute;
    z-index: 3;
    top: 18%;
    left: 20%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #51d8ee, #5d7cff, transparent);
    box-shadow: 0 0 14px rgba(67, 199, 237, 0.65);
    transform: rotate(-45deg);
    animation: ai-scan 2.8s ease-in-out infinite;
}

.soft-workbench .ai-orbit {
    --orbit-angle: -12deg;
    --orbit-turn: 360deg;
    --orbit-duration: 9s;
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(72, 118, 244, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(var(--orbit-angle));
    animation: ai-orbit-spin var(--orbit-duration) linear infinite;
    will-change: transform;
    z-index: 2;
}

.soft-workbench .ai-orbit::before,
.soft-workbench .ai-orbit::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.soft-workbench .ai-orbit::before {
    inset: -2px;
    border-top: 2px solid rgba(76, 126, 249, 0.72);
    border-right: 2px solid transparent;
    animation: ai-core-spin 5.4s linear infinite;
}

.soft-workbench .ai-orbit::after,
.soft-workbench .ai-orbit i,
.soft-workbench .ai-orbit b {
    width: 8px;
    height: 8px;
    background: #fff;
    border: 2px solid #5b88fa;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(83, 128, 248, 0.09), 0 0 18px rgba(83, 128, 248, 0.34);
    animation: ai-node-signal 2.2s ease-in-out infinite;
}

.soft-workbench .ai-orbit::after { top: 12%; right: 10%; }
.soft-workbench .ai-orbit i { position: absolute; left: 7%; bottom: 18%; }
.soft-workbench .ai-orbit b { position: absolute; right: 22%; bottom: -4px; }
.soft-workbench .ai-orbit i { animation-delay: -0.7s; }
.soft-workbench .ai-orbit b { animation-delay: -1.4s; }

.soft-workbench .ai-orbit-alpha {
    width: 54%;
    height: 54%;
    --orbit-duration: 8.5s;
}

.soft-workbench .ai-orbit-beta {
    width: 73%;
    height: 39%;
    --orbit-angle: 19deg;
    --orbit-turn: -360deg;
    --orbit-duration: 11.5s;
    border-color: rgba(61, 197, 225, 0.2);
    animation-delay: -2s;
}

.soft-workbench .ai-orbit-gamma {
    width: 88%;
    height: 65%;
    --orbit-angle: -5deg;
    --orbit-duration: 15s;
    border-style: dashed;
    border-color: rgba(75, 112, 218, 0.12);
    animation-delay: -4s;
}

.soft-workbench .ai-data-stream {
    z-index: 2;
    position: absolute;
    top: 17%;
    width: 2px;
    height: 66%;
    overflow: hidden;
    background: linear-gradient(180deg, transparent, rgba(82, 132, 247, 0.18), transparent);
}

.soft-workbench .ai-data-stream::after {
    content: '';
    position: absolute;
    inset: -40% 0 auto;
    height: 34%;
    background: linear-gradient(180deg, transparent, #5b8bff, transparent);
    animation: ai-data-flow 2.6s linear infinite;
}

.soft-workbench .stream-left { left: 15%; transform: rotate(8deg); }
.soft-workbench .stream-right { right: 15%; transform: rotate(-8deg); }
.soft-workbench .stream-right::after { animation-delay: -1.3s; }

.soft-workbench .ai-particle {
    z-index: 2;
    position: absolute;
    width: 5px;
    height: 5px;
    background: #72d9ed;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(72, 197, 229, 0.65);
    animation: ai-particle-drift 4s ease-in-out infinite;
}

.soft-workbench .particle-one { top: 18%; left: 25%; }
.soft-workbench .particle-two { top: 24%; right: 20%; animation-delay: -0.8s; }
.soft-workbench .particle-three { right: 12%; bottom: 27%; animation-delay: -1.6s; }
.soft-workbench .particle-four { bottom: 18%; left: 21%; animation-delay: -2.4s; }
.soft-workbench .particle-five { top: 48%; left: 8%; animation-delay: -3.2s; }

.soft-workbench .empty-copy {
    width: min(580px, 100%);
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.soft-workbench .empty-kicker {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    padding: 5px 11px;
    color: var(--accent-primary);
    background: var(--sys-color-primary-soft);
    border: 1px solid #dce5ff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
}

.soft-workbench .empty-kicker-icon {
    animation: empty-spark-pulse 2.4s ease-in-out infinite;
}

.soft-workbench .empty-title {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(25px, 2.3vw, 34px);
    line-height: 1.22;
    letter-spacing: -0.045em;
}

.soft-workbench .empty-desc {
    max-width: 520px;
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.soft-workbench .empty-start-btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 18px;
    padding: 0 24px;
    color: #fff;
    background: linear-gradient(180deg, #5680f7 0%, #3f6ff3 100%);
    border: 0;
    border-radius: 16px;
    box-shadow: 0 12px 26px rgba(71, 115, 244, 0.22);
    font-size: 14px;
    font-weight: 650;
    transition: transform var(--sys-motion-fast), box-shadow var(--sys-motion-fast), background var(--sys-motion-fast);
}

.soft-workbench .empty-start-btn:hover {
    background: linear-gradient(180deg, #4b75ed 0%, #3561dc 100%);
    box-shadow: 0 15px 32px rgba(71, 115, 244, 0.26);
    transform: translateY(-2px);
}

.soft-workbench .empty-start-btn:active {
    transform: translateY(0) scale(0.99);
}

.soft-workbench .empty-start-btn svg {
    transition: transform var(--sys-motion-fast);
}

.soft-workbench .empty-start-btn:hover svg {
    transform: translateX(2px);
}

.soft-workbench .empty-steps {
    gap: 10px;
    margin-top: 14px;
    padding: 7px 10px;
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 13px;
    box-shadow: var(--sys-shadow-xs);
}

.soft-workbench .step-num {
    border-radius: 7px;
}

.soft-workbench .step-item {
    gap: 7px;
    color: var(--text-secondary);
    font-size: 11px;
    white-space: nowrap;
}

.soft-workbench .step-divider {
    width: 20px;
    height: 1px;
    background: var(--sys-color-border);
}

/* AI generative composition narrative */
.soft-workbench .ai-compose-stage {
    width: min(680px, 100%);
    height: clamp(260px, 36dvh, 350px);
    overflow: hidden;
    border: 1px solid rgba(191, 205, 235, 0.44);
    border-radius: 42px;
    background:
        radial-gradient(circle at 50% 48%, rgba(86, 132, 255, 0.11), transparent 28%),
        radial-gradient(circle at 20% 54%, rgba(100, 215, 233, 0.06), transparent 24%),
        linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.82));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 22px 70px rgba(42, 68, 122, 0.055);
}

.soft-workbench .ai-compose-stage::before {
    z-index: 0;
    inset: 0;
    opacity: 0.46;
    border-radius: inherit;
    background-image: radial-gradient(circle, rgba(74, 116, 230, 0.25) 0 1px, transparent 1.4px);
    background-size: 24px 24px;
    filter: none;
    -webkit-mask: radial-gradient(ellipse at center, #000 0 36%, transparent 76%);
    mask: radial-gradient(ellipse at center, #000 0 36%, transparent 76%);
    animation: compose-field-drift 16s linear infinite;
}

.soft-workbench .ai-compose-stage::after {
    z-index: 0;
    inset: auto 12% -42% 12%;
    height: 68%;
    opacity: 0.52;
    border: 1px solid rgba(83, 126, 240, 0.12);
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(79, 128, 246, 0.08), transparent 66%);
    -webkit-mask: none;
    mask: none;
    animation: compose-horizon-breathe 5.4s ease-in-out infinite;
}

.soft-workbench .compose-aurora {
    position: absolute;
    z-index: 0;
    inset: 16% 25%;
    background: conic-gradient(from 30deg, rgba(78, 118, 246, 0), rgba(78, 118, 246, 0.17), rgba(83, 219, 232, 0.13), rgba(120, 91, 241, 0.12), rgba(78, 118, 246, 0));
    border-radius: 50%;
    filter: blur(24px);
    animation: compose-aurora-turn 14s linear infinite;
}

.soft-workbench .compose-infinity {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.soft-workbench .compose-infinity path {
    vector-effect: non-scaling-stroke;
}

.soft-workbench .infinity-glow {
    stroke: rgba(73, 118, 242, 0.08);
    stroke-width: 14;
    filter: blur(6px);
}

.soft-workbench .infinity-signal {
    stroke: rgba(76, 124, 247, 0.24);
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-dasharray: 3 12;
    animation: compose-infinity-flow 18s linear infinite;
}

.soft-workbench .compose-source,
.soft-workbench .compose-output,
.soft-workbench .compose-engine,
.soft-workbench .compose-link {
    position: absolute;
    z-index: 3;
}

.soft-workbench .compose-source {
    top: 50%;
    left: 5.5%;
    width: 94px;
    height: 190px;
    transform: translateY(-50%);
}

.soft-workbench .compose-stage-label {
    position: absolute;
    top: 8px;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #7e8ba5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

.soft-workbench .compose-stage-label i {
    width: 5px;
    height: 5px;
    background: #5f86f2;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(86, 128, 240, 0.08), 0 0 14px rgba(86, 128, 240, 0.4);
    animation: compose-label-pulse 2.8s ease-in-out infinite;
}

.soft-workbench .source-card,
.soft-workbench .output-card {
    position: absolute;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #5c7fe2;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(174, 192, 232, 0.72);
    box-shadow: 0 14px 34px rgba(45, 68, 116, 0.09), inset 0 1px 0 #fff;
}

.soft-workbench .source-card {
    width: 72px;
    height: 72px;
    border-radius: 21px;
    animation: compose-source-float 5.8s ease-in-out infinite;
}

.soft-workbench .source-reference {
    top: 43px;
    left: 0;
    border-style: dashed;
    transform: rotate(-4deg);
}

.soft-workbench .source-product {
    top: 102px;
    left: 22px;
    animation-delay: -2.9s;
}

.soft-workbench .source-product i,
.soft-workbench .output-card i {
    width: 30px;
    height: 36px;
    background: linear-gradient(155deg, #789af3, #9f8eea);
    border-radius: 12px 12px 9px 9px;
    box-shadow: 0 7px 16px rgba(94, 120, 206, 0.18);
}

.soft-workbench .source-product b,
.soft-workbench .output-card b {
    position: absolute;
    right: 15px;
    bottom: 12px;
    left: 15px;
    height: 2px;
    background: rgba(110, 129, 171, 0.26);
    border-radius: 999px;
}

.soft-workbench .compose-engine {
    top: 50%;
    left: 50%;
    width: 192px;
    height: 192px;
    transform: translate(-50%, -50%);
    animation: compose-engine-hover 5.6s ease-in-out infinite;
}

.soft-workbench .engine-orbit {
    position: absolute;
    border-radius: 50%;
    -webkit-mask: radial-gradient(circle, transparent 62%, #000 63% 66%, transparent 67%);
    mask: radial-gradient(circle, transparent 62%, #000 63% 66%, transparent 67%);
}

.soft-workbench .engine-orbit-outer {
    inset: 0;
    opacity: 0.72;
    background: conic-gradient(from 0deg, transparent 0 18%, #6c91f5 27%, transparent 38% 65%, #64d9e9 77%, transparent 88%);
    animation: compose-orbit-spin 9s linear infinite;
}

.soft-workbench .engine-orbit-inner {
    inset: 13px;
    opacity: 0.42;
    background: conic-gradient(from 180deg, transparent 0 30%, #8e7bea 42%, transparent 54% 76%, #6d9cf4 88%, transparent 96%);
    animation: compose-orbit-spin 7s linear infinite reverse;
}

.soft-workbench .engine-frame {
    position: absolute;
    inset: 30px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 245, 255, 0.9));
    border: 1px solid rgba(146, 171, 229, 0.54);
    border-radius: 30px;
    box-shadow: 0 24px 58px rgba(48, 78, 147, 0.16), inset 0 0 0 7px rgba(255, 255, 255, 0.74);
}

.soft-workbench .composition-grid {
    position: absolute;
    inset: 18px;
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(82, 121, 222, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(82, 121, 222, 0.16) 1px, transparent 1px);
    background-size: 33.333% 33.333%;
    border: 1px solid rgba(82, 121, 222, 0.12);
    border-radius: 16px;
}

.soft-workbench .composition-subject {
    position: absolute;
    top: 38px;
    left: 50%;
    width: 48px;
    height: 58px;
    background: linear-gradient(155deg, #638bf1, #8b7ce5 58%, #66cbdc);
    border-radius: 18px 18px 13px 13px;
    box-shadow: 0 14px 30px rgba(73, 103, 190, 0.24);
    transform: translateX(-50%);
    animation: compose-subject-morph 5.6s ease-in-out infinite;
}

.soft-workbench .composition-subject i {
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: inherit;
}

.soft-workbench .composition-subject b {
    position: absolute;
    right: 9px;
    bottom: 8px;
    left: 9px;
    height: 2px;
    background: rgba(255, 255, 255, 0.64);
    border-radius: 999px;
}

.soft-workbench .composition-scan {
    position: absolute;
    z-index: 3;
    top: 17px;
    right: 17px;
    left: 17px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #69d8e8, #6489f4, transparent);
    box-shadow: 0 0 16px rgba(91, 168, 235, 0.62);
    animation: compose-scan-pass 3.4s ease-in-out infinite;
}

.soft-workbench .frame-corner {
    position: absolute;
    z-index: 4;
    width: 15px;
    height: 15px;
    opacity: 0.72;
}

.soft-workbench .corner-tl { top: 12px; left: 12px; border-top: 1.5px solid #668df2; border-left: 1.5px solid #668df2; border-radius: 6px 0 0; }
.soft-workbench .corner-tr { top: 12px; right: 12px; border-top: 1.5px solid #668df2; border-right: 1.5px solid #668df2; border-radius: 0 6px 0 0; }
.soft-workbench .corner-bl { bottom: 12px; left: 12px; border-bottom: 1.5px solid #668df2; border-left: 1.5px solid #668df2; border-radius: 0 0 0 6px; }
.soft-workbench .corner-br { right: 12px; bottom: 12px; border-right: 1.5px solid #668df2; border-bottom: 1.5px solid #668df2; border-radius: 0 0 6px; }

.soft-workbench .composition-spark {
    position: absolute;
    z-index: 5;
    color: #5f8df5;
    font-size: 11px;
    text-shadow: 0 0 12px rgba(87, 134, 243, 0.55);
    animation: compose-spark 3.2s ease-in-out infinite;
}

.soft-workbench .spark-a { top: 26px; right: 25px; }
.soft-workbench .spark-b { bottom: 23px; left: 27px; animation-delay: -1.6s; }

.soft-workbench .engine-caption {
    position: absolute;
    right: 28px;
    bottom: -1px;
    left: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #617398;
    font-size: 8px;
    font-weight: 750;
    letter-spacing: 0.12em;
}

.soft-workbench .engine-caption i {
    width: 5px;
    height: 5px;
    background: #5dd4e5;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(72, 200, 224, 0.72);
    animation: compose-label-pulse 1.9s ease-in-out infinite;
}

.soft-workbench .compose-link {
    top: 50%;
    width: 13%;
    height: 1px;
    overflow: visible;
    background: linear-gradient(90deg, transparent, rgba(89, 132, 238, 0.34), transparent);
}

.soft-workbench .compose-link-in { left: 20%; }
.soft-workbench .compose-link-out { right: 20%; }

.soft-workbench .compose-link i,
.soft-workbench .compose-link b {
    position: absolute;
    top: -3px;
    left: 0;
    width: 7px;
    height: 7px;
    background: #fff;
    border: 1.5px solid #6b91f3;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(91, 132, 240, 0.08), 0 0 14px rgba(91, 132, 240, 0.38);
    animation: compose-packet-flow 2.8s ease-in-out infinite;
}

.soft-workbench .compose-link b { animation-delay: -1.4s; }
.soft-workbench .compose-link-out i,
.soft-workbench .compose-link-out b { animation-direction: reverse; }

.soft-workbench .compose-output {
    top: 50%;
    right: 5%;
    width: 104px;
    height: 190px;
    transform: translateY(-50%);
}

.soft-workbench .compose-output .compose-stage-label {
    right: 0;
    left: auto;
}

.soft-workbench .output-card {
    top: 55px;
    width: 76px;
    height: 76px;
    border-radius: 21px;
    transform-origin: 50% 120%;
    animation: compose-possibility-cycle 7.2s ease-in-out infinite;
}

.soft-workbench .output-card-a {
    left: -2px;
    z-index: 1;
    opacity: 0.58;
    transform: translate(-8px, 12px) rotate(-9deg) scale(0.9);
    animation-delay: -4.8s;
}

.soft-workbench .output-card-b {
    left: 13px;
    z-index: 2;
    opacity: 0.78;
    transform: translate(0, 7px) rotate(-1deg) scale(0.95);
    animation-delay: -2.4s;
}

.soft-workbench .output-card-c {
    left: 27px;
    z-index: 3;
    transform: translate(7px, 0) rotate(7deg);
}

.soft-workbench .output-card-a i { background: linear-gradient(155deg, #72a3f3, #68cfdd); border-radius: 50%; }
.soft-workbench .output-card-b i { width: 38px; height: 30px; background: linear-gradient(155deg, #8c83e9, #7099f2); border-radius: 12px; }
.soft-workbench .output-card-c i { background: linear-gradient(155deg, #668cf0, #a37fe5); }

.soft-workbench .output-card i {
    animation: compose-variation-morph 6.8s ease-in-out infinite;
}

.soft-workbench .output-card-b i { animation-delay: -2.2s; }
.soft-workbench .output-card-c i { animation-delay: -4.4s; }

.soft-workbench .compose-steps {
    width: min(540px, 100%);
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 18px;
    padding: 6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 255, 0.94));
    border: 1px solid rgba(196, 207, 230, 0.72);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(34, 55, 98, 0.06), inset 0 1px 0 #fff;
}

.soft-workbench .compose-steps .step-item {
    min-width: 132px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: var(--text-secondary);
    animation: compose-step-focus 7.2s ease-in-out infinite;
}

.soft-workbench .compose-steps .step-item:nth-of-type(3) { animation-delay: -4.8s; }
.soft-workbench .compose-steps .step-item:nth-of-type(5) { animation-delay: -2.4s; }

.soft-workbench .compose-steps .step-num {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #5579d8;
    background: rgba(237, 243, 255, 0.92);
    border: 1px solid rgba(173, 193, 238, 0.7);
    border-radius: 11px;
    font-size: 9px;
    font-weight: 760;
    letter-spacing: 0.04em;
}

.soft-workbench .compose-steps .step-text {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.soft-workbench .compose-steps .step-text strong {
    color: #29354c;
    font-size: 11px;
    font-weight: 680;
}

.soft-workbench .compose-steps .step-text small {
    color: #8a96aa;
    font-size: 9px;
    font-weight: 500;
}

.soft-workbench .compose-steps .step-divider {
    position: relative;
    width: 34px;
    height: 1px;
    overflow: visible;
    background: linear-gradient(90deg, rgba(137, 157, 199, 0.16), rgba(95, 133, 226, 0.38), rgba(137, 157, 199, 0.16));
}

.soft-workbench .compose-steps .step-divider i {
    position: absolute;
    top: -2px;
    left: 0;
    width: 5px;
    height: 5px;
    background: #fff;
    border: 1px solid #6d91ed;
    border-radius: 50%;
    box-shadow: 0 0 9px rgba(82, 125, 232, 0.42);
    animation: compose-step-packet 2.8s ease-in-out infinite;
}

.soft-workbench .compose-steps .step-divider:nth-of-type(4) i { animation-delay: -1.4s; }

@keyframes compose-field-drift {
    to { background-position: 24px 12px; }
}

@keyframes compose-horizon-breathe {
    0%, 100% { opacity: 0.3; transform: scaleX(0.92); }
    50% { opacity: 0.62; transform: scaleX(1.04); }
}

@keyframes compose-aurora-turn {
    to { transform: rotate(360deg) scale(1.08); }
}

@keyframes compose-infinity-flow {
    to { stroke-dashoffset: -180; }
}

@keyframes compose-label-pulse {
    0%, 100% { opacity: 0.45; transform: scale(0.78); }
    50% { opacity: 1; transform: scale(1.18); }
}

@keyframes compose-source-float {
    0%, 100% { margin-top: -3px; }
    50% { margin-top: 5px; }
}

@keyframes compose-engine-hover {
    0%, 100% { transform: translate(-50%, -50%) translateY(-3px); }
    50% { transform: translate(-50%, -50%) translateY(4px); }
}

@keyframes compose-orbit-spin {
    to { transform: rotate(360deg); }
}

@keyframes compose-subject-morph {
    0%, 100% { transform: translateX(-50%) scale(0.94); border-radius: 18px 18px 13px 13px; filter: hue-rotate(0deg); }
    50% { transform: translateX(-50%) scale(1.06); border-radius: 23px 14px 20px 12px; filter: hue-rotate(18deg); }
}

@keyframes compose-scan-pass {
    0%, 100% { top: 18px; opacity: 0; }
    15%, 85% { opacity: 1; }
    50% { top: calc(100% - 20px); opacity: 0.8; }
}

@keyframes compose-spark {
    0%, 100% { opacity: 0; transform: scale(0.55) rotate(0); }
    50% { opacity: 1; transform: scale(1.15) rotate(22deg); }
}

@keyframes compose-packet-flow {
    0% { left: 0; opacity: 0; transform: scale(0.65); }
    18%, 82% { opacity: 1; }
    100% { left: calc(100% - 7px); opacity: 0; transform: scale(1.1); }
}

@keyframes compose-possibility-cycle {
    0%, 100% { margin-top: 0; filter: saturate(0.88); }
    50% { margin-top: -7px; filter: saturate(1.15); }
}

@keyframes compose-variation-morph {
    0%, 100% { transform: translate(-3px, 2px) scale(0.9); filter: hue-rotate(0deg); }
    50% { transform: translate(4px, -3px) scale(1.08); filter: hue-rotate(24deg); }
}

@keyframes compose-step-focus {
    0%, 24%, 100% { background: transparent; border-color: transparent; box-shadow: none; }
    38%, 58% { background: rgba(242, 246, 255, 0.88); border-color: rgba(187, 202, 238, 0.48); box-shadow: 0 8px 20px rgba(57, 87, 153, 0.055); }
}

@keyframes compose-step-packet {
    0% { left: 0; opacity: 0; }
    22%, 78% { opacity: 1; }
    100% { left: calc(100% - 5px); opacity: 0; }
}

/* Infinite generative canvas — deliberately abstract and label-free */
.soft-workbench .ai-genesis-stage {
    width: min(680px, 100%);
    height: clamp(260px, 36dvh, 350px);
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: radial-gradient(ellipse at center, rgba(81, 125, 242, 0.075), transparent 54%);
    box-shadow: none;
}

.soft-workbench .ai-genesis-stage::before {
    z-index: 0;
    inset: 3% 8%;
    opacity: 0.5;
    border: 0;
    border-radius: 50%;
    background-image: radial-gradient(circle, rgba(86, 125, 219, 0.3) 0 1px, transparent 1.35px);
    background-size: 26px 26px;
    filter: none;
    -webkit-mask: radial-gradient(ellipse, #000 0 30%, transparent 72%);
    mask: radial-gradient(ellipse, #000 0 30%, transparent 72%);
    animation: genesis-field-drift 18s linear infinite;
}

.soft-workbench .ai-genesis-stage::after {
    z-index: 0;
    inset: 19% 26%;
    height: auto;
    opacity: 0.7;
    border: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(86, 133, 250, 0.13), rgba(76, 216, 231, 0.055) 38%, transparent 69%);
    filter: blur(17px);
    -webkit-mask: none;
    mask: none;
    animation: genesis-ambient-breathe 5.8s ease-in-out infinite;
}

.soft-workbench .genesis-ambient {
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 50%;
    width: 290px;
    height: 290px;
    background: conic-gradient(from 40deg, transparent, rgba(87, 124, 241, 0.16), rgba(80, 215, 229, 0.12), rgba(136, 100, 232, 0.1), transparent 76%);
    border-radius: 50%;
    filter: blur(25px);
    transform: translate(-50%, -50%);
    animation: genesis-ambient-turn 16s linear infinite;
}

.soft-workbench .genesis-ribbon {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.soft-workbench .genesis-ribbon path {
    vector-effect: non-scaling-stroke;
    fill: none;
}

.soft-workbench .ribbon-blur {
    stroke: rgba(78, 123, 242, 0.11);
    stroke-width: 12;
    filter: blur(7px);
}

.soft-workbench .ribbon-line {
    stroke: rgba(92, 128, 220, 0.18);
    stroke-width: 1;
}

.soft-workbench .ribbon-signal {
    stroke: rgba(83, 133, 248, 0.68);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-dasharray: 2 22;
    animation: genesis-ribbon-flow 13s linear infinite;
}

.soft-workbench .genesis-scene {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    width: 320px;
    height: 280px;
    perspective: 1000px;
    transform: translate(-50%, -50%);
    transform-style: preserve-3d;
    animation: genesis-scene-hover 6.8s ease-in-out infinite;
}

.soft-workbench .genesis-aura {
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 50%;
    width: 215px;
    height: 215px;
    background: radial-gradient(circle, rgba(91, 137, 248, 0.14), rgba(85, 215, 231, 0.05) 43%, transparent 70%);
    border-radius: 50%;
    filter: blur(8px);
    transform: translate(-50%, -50%);
    animation: genesis-aura-pulse 4.8s ease-in-out infinite;
}

.soft-workbench .genesis-ring {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform-style: preserve-3d;
}

.soft-workbench .genesis-ring::before,
.soft-workbench .genesis-ring::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.soft-workbench .genesis-ring::before {
    inset: -2px;
    border-top: 1.5px solid rgba(91, 137, 247, 0.72);
    border-right: 1px solid transparent;
}

.soft-workbench .genesis-ring::after {
    width: 7px;
    height: 7px;
    background: #fff;
    border: 1.5px solid #6b91f3;
    box-shadow: 0 0 0 5px rgba(91, 132, 240, 0.08), 0 0 18px rgba(91, 132, 240, 0.42);
}

.soft-workbench .genesis-ring-a {
    width: 238px;
    height: 128px;
    border: 1px solid rgba(78, 124, 237, 0.15);
    transform: translate(-50%, -50%) rotate(-18deg) rotateX(62deg);
    animation: genesis-ring-a 10s linear infinite;
}

.soft-workbench .genesis-ring-a::after { top: 16%; right: 9%; }

.soft-workbench .genesis-ring-b {
    width: 188px;
    height: 188px;
    border: 1px dashed rgba(89, 205, 224, 0.19);
    transform: translate(-50%, -50%) rotateY(67deg) rotate(15deg);
    animation: genesis-ring-b 13s linear infinite reverse;
}

.soft-workbench .genesis-ring-b::after { right: 12%; bottom: 13%; border-color: #63cedf; }

.soft-workbench .genesis-layer,
.soft-workbench .genesis-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 158px;
    height: 158px;
    border-radius: 32px;
    transform-style: preserve-3d;
}

.soft-workbench .genesis-layer {
    z-index: 2;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(235, 242, 255, 0.2));
    border: 1px solid rgba(137, 163, 222, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.soft-workbench .genesis-layer i {
    position: absolute;
    inset: 20px;
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(91, 126, 216, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91, 126, 216, 0.09) 1px, transparent 1px);
    background-size: 33.333% 33.333%;
    border: 1px solid rgba(91, 126, 216, 0.08);
    border-radius: 20px;
}

.soft-workbench .genesis-layer-a {
    animation: genesis-layer-a 9.6s ease-in-out infinite;
}

.soft-workbench .genesis-layer-b {
    animation: genesis-layer-b 9.6s ease-in-out -3.2s infinite;
}

.soft-workbench .genesis-layer-c {
    animation: genesis-layer-c 9.6s ease-in-out -6.4s infinite;
}

.soft-workbench .genesis-canvas {
    z-index: 5;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 244, 255, 0.92));
    border: 1px solid rgba(132, 159, 222, 0.55);
    box-shadow: 0 28px 70px rgba(43, 70, 137, 0.17), inset 0 0 0 8px rgba(255, 255, 255, 0.72);
    transform: translate(-50%, -50%) translateZ(38px);
    animation: genesis-canvas-breathe 5.8s ease-in-out infinite;
}

.soft-workbench .genesis-grid {
    position: absolute;
    inset: 21px;
    opacity: 0.42;
    background-image:
        linear-gradient(rgba(74, 112, 211, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 112, 211, 0.16) 1px, transparent 1px);
    background-size: 33.333% 33.333%;
    border: 1px solid rgba(74, 112, 211, 0.11);
    border-radius: 18px;
    animation: genesis-grid-pulse 4.8s ease-in-out infinite;
}

.soft-workbench .genesis-subject {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    width: 54px;
    height: 66px;
    overflow: hidden;
    background: linear-gradient(155deg, #638af0, #8b7de6 62%, #62cbdc);
    border-radius: 20px 20px 14px 14px;
    box-shadow: 0 16px 35px rgba(69, 101, 192, 0.25);
    transform: translate(-50%, -50%);
    animation: genesis-recompose 8.4s cubic-bezier(0.55, 0, 0.25, 1) infinite;
}

.soft-workbench .genesis-subject i {
    position: absolute;
    inset: 9px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: inherit;
}

.soft-workbench .genesis-subject b {
    position: absolute;
    right: 10px;
    bottom: 9px;
    left: 10px;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
}

.soft-workbench .genesis-scan {
    position: absolute;
    z-index: 4;
    top: 20px;
    right: 20px;
    left: 20px;
    height: 1.5px;
    opacity: 0;
    background: linear-gradient(90deg, transparent, #62d8e8, #6389f2, transparent);
    box-shadow: 0 0 15px rgba(85, 170, 234, 0.58);
    animation: genesis-scan-pass 3.8s ease-in-out infinite;
}

.soft-workbench .genesis-glint {
    position: absolute;
    z-index: 5;
    top: -35%;
    bottom: -35%;
    left: -55%;
    width: 27%;
    opacity: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
    transform: skewX(-18deg);
    animation: genesis-glint-pass 5.6s ease-in-out infinite;
}

.soft-workbench .genesis-corner {
    position: absolute;
    z-index: 6;
    width: 18px;
    height: 18px;
    opacity: 0.72;
}

.soft-workbench .genesis-corner-tl { top: 13px; left: 13px; border-top: 1.5px solid #668df2; border-left: 1.5px solid #668df2; border-radius: 7px 0 0; }
.soft-workbench .genesis-corner-tr { top: 13px; right: 13px; border-top: 1.5px solid #668df2; border-right: 1.5px solid #668df2; border-radius: 0 7px 0 0; }
.soft-workbench .genesis-corner-bl { bottom: 13px; left: 13px; border-bottom: 1.5px solid #668df2; border-left: 1.5px solid #668df2; border-radius: 0 0 0 7px; }
.soft-workbench .genesis-corner-br { right: 13px; bottom: 13px; border-right: 1.5px solid #668df2; border-bottom: 1.5px solid #668df2; border-radius: 0 0 7px; }

.soft-workbench .genesis-node {
    position: absolute;
    z-index: 3;
    width: 7px;
    height: 7px;
    background: #fff;
    border: 1.5px solid #7192ed;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(91, 132, 240, 0.065), 0 0 17px rgba(91, 132, 240, 0.35);
    animation: genesis-node-pulse 3.2s ease-in-out infinite;
}

.soft-workbench .node-a { top: 27%; left: 18%; }
.soft-workbench .node-b { top: 65%; left: 22%; animation-delay: -0.6s; }
.soft-workbench .node-c { top: 35%; left: 34%; animation-delay: -1.2s; }
.soft-workbench .node-d { right: 33%; bottom: 29%; animation-delay: -1.8s; }
.soft-workbench .node-e { top: 25%; right: 20%; animation-delay: -2.4s; }
.soft-workbench .node-f { right: 15%; bottom: 38%; animation-delay: -3s; }

.soft-workbench .genesis-fragment {
    position: absolute;
    z-index: 2;
    width: 64px;
    height: 64px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.44);
    border: 1px solid rgba(151, 175, 229, 0.24);
    border-radius: 19px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    animation: genesis-fragment-float 8s ease-in-out infinite;
}

.soft-workbench .genesis-fragment i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 25px;
    opacity: 0.4;
    background: linear-gradient(155deg, #7797ee, #8d82e4);
    border-radius: 8px;
    transform: translate(-50%, -50%);
}

.soft-workbench .fragment-a { top: 21%; left: 10%; transform: rotate(-11deg) scale(0.82); }
.soft-workbench .fragment-b { right: 10%; bottom: 20%; transform: rotate(12deg) scale(0.9); animation-delay: -2s; }
.soft-workbench .fragment-c { bottom: 14%; left: 29%; transform: rotate(7deg) scale(0.62); animation-delay: -4s; }
.soft-workbench .fragment-d { top: 17%; right: 28%; transform: rotate(-7deg) scale(0.58); animation-delay: -6s; }

.soft-workbench .compose-steps {
    width: min(470px, 100%);
    min-height: 42px;
    gap: 0;
    margin-top: 16px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.soft-workbench .compose-steps .step-item {
    min-width: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 4px 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    animation: none;
}

.soft-workbench .compose-steps .step-num {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    color: #4b63a0;
    background: rgba(246, 249, 255, 0.92);
    border: 1px solid rgba(166, 188, 236, 0.68);
    border-radius: 50%;
    font-size: 9px;
    animation: genesis-step-phase 7.8s ease-in-out infinite;
}

.soft-workbench .compose-steps .step-item:nth-of-type(3) .step-num { animation-delay: -5.2s; }
.soft-workbench .compose-steps .step-item:nth-of-type(5) .step-num { animation-delay: -2.6s; }

.soft-workbench .compose-steps .step-text {
    display: inline;
    color: #67748b;
    font-size: 10px;
    font-weight: 580;
    text-align: left;
}

.soft-workbench .compose-steps .step-divider {
    width: 52px;
    background: linear-gradient(90deg, rgba(129, 151, 202, 0.11), rgba(94, 132, 225, 0.32), rgba(129, 151, 202, 0.11));
}

.soft-workbench .compose-steps .step-divider i {
    animation-duration: 3.2s;
}

@keyframes genesis-field-drift {
    to { background-position: 26px 13px; }
}

@keyframes genesis-ambient-breathe {
    0%, 100% { opacity: 0.44; transform: scale(0.9); }
    50% { opacity: 0.82; transform: scale(1.1); }
}

@keyframes genesis-ambient-turn {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes genesis-ribbon-flow {
    to { stroke-dashoffset: -240; }
}

@keyframes genesis-scene-hover {
    0%, 100% { transform: translate(-50%, -50%) translateY(-3px); }
    50% { transform: translate(-50%, -50%) translateY(5px); }
}

@keyframes genesis-aura-pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.9); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}

@keyframes genesis-ring-a {
    to { transform: translate(-50%, -50%) rotate(342deg) rotateX(62deg); }
}

@keyframes genesis-ring-b {
    to { transform: translate(-50%, -50%) rotateY(67deg) rotate(375deg); }
}

@keyframes genesis-layer-a {
    0%, 100% { opacity: 0.16; transform: translate(-50%, -50%) translate3d(-112px, 5px, -90px) rotateY(-54deg) rotateZ(-10deg) scale(0.76); }
    50% { opacity: 0.42; transform: translate(-50%, -50%) translate3d(-78px, -10px, -35px) rotateY(-38deg) rotateZ(-6deg) scale(0.86); }
}

@keyframes genesis-layer-b {
    0%, 100% { opacity: 0.16; transform: translate(-50%, -50%) translate3d(112px, -3px, -90px) rotateY(54deg) rotateZ(10deg) scale(0.76); }
    50% { opacity: 0.42; transform: translate(-50%, -50%) translate3d(78px, 11px, -35px) rotateY(38deg) rotateZ(6deg) scale(0.86); }
}

@keyframes genesis-layer-c {
    0%, 100% { opacity: 0.13; transform: translate(-50%, -50%) translate3d(0, -56px, -130px) rotateX(48deg) scale(0.82); }
    50% { opacity: 0.34; transform: translate(-50%, -50%) translate3d(0, -36px, -55px) rotateX(34deg) scale(0.92); }
}

@keyframes genesis-canvas-breathe {
    0%, 100% { box-shadow: 0 25px 62px rgba(43, 70, 137, 0.14), inset 0 0 0 8px rgba(255, 255, 255, 0.72); }
    50% { box-shadow: 0 34px 82px rgba(48, 84, 166, 0.23), 0 0 0 10px rgba(91, 132, 240, 0.035), inset 0 0 0 8px rgba(255, 255, 255, 0.88); }
}

@keyframes genesis-grid-pulse {
    0%, 100% { opacity: 0.28; }
    50% { opacity: 0.58; }
}

@keyframes genesis-recompose {
    0%, 100% { top: 50%; left: 50%; width: 54px; height: 66px; border-radius: 20px 20px 14px 14px; filter: hue-rotate(0deg); }
    30% { top: 45%; left: 44%; width: 62px; height: 56px; border-radius: 23px 14px 19px 13px; filter: hue-rotate(15deg); }
    65% { top: 55%; left: 56%; width: 48px; height: 72px; border-radius: 15px 24px 14px 21px; filter: hue-rotate(-13deg); }
}

@keyframes genesis-scan-pass {
    0%, 100% { top: 20px; opacity: 0; }
    16%, 84% { opacity: 1; }
    50% { top: calc(100% - 22px); opacity: 0.8; }
}

@keyframes genesis-glint-pass {
    0%, 46% { left: -55%; opacity: 0; }
    58% { opacity: 0.9; }
    76%, 100% { left: 135%; opacity: 0; }
}

@keyframes genesis-node-pulse {
    0%, 100% { opacity: 0.26; transform: scale(0.66); }
    50% { opacity: 1; transform: scale(1.14); }
}

@keyframes genesis-fragment-float {
    0%, 100% { margin-top: 5px; opacity: 0.2; }
    50% { margin-top: -7px; opacity: 0.58; }
}

@keyframes genesis-step-phase {
    0%, 26%, 100% { color: #53627f; background: rgba(248, 250, 255, 0.9); box-shadow: none; transform: scale(0.94); }
    40%, 58% { color: #315bc7; background: #f1f5ff; box-shadow: 0 0 0 5px rgba(83, 126, 239, 0.06), 0 8px 18px rgba(55, 86, 153, 0.09); transform: scale(1); }
}

@keyframes ai-grid-drift {
    to { background-position: 0 34px, 34px 0; }
}

@keyframes ai-ambient-pulse {
    0%, 100% { opacity: 0.55; transform: scale(0.94); }
    50% { opacity: 1; transform: scale(1.06); }
}

@keyframes ai-core-spin {
    to { transform: rotate(360deg); }
}

@keyframes ai-nebula-turn {
    0% { transform: rotate(0deg) scale(0.94); opacity: 0.42; }
    50% { transform: rotate(180deg) scale(1.08); opacity: 0.78; }
    100% { transform: rotate(360deg) scale(0.94); opacity: 0.42; }
}

@keyframes ai-signal-sweep {
    to { transform: rotate(360deg); }
}

@keyframes ai-core-ring-pulse {
    0%, 100% { box-shadow: 0 18px 50px rgba(55, 91, 175, 0.13), inset 0 0 0 9px rgba(255, 255, 255, 0.62); }
    50% { box-shadow: 0 26px 72px rgba(55, 111, 214, 0.24), 0 0 0 8px rgba(76, 131, 250, 0.05), inset 0 0 0 9px rgba(255, 255, 255, 0.78); }
}

@keyframes ai-chip-glint {
    0%, 42% { left: -80%; opacity: 0; }
    55% { opacity: 1; }
    72%, 100% { left: 140%; opacity: 0; }
}

@keyframes ai-node-signal {
    0%, 100% { opacity: 0.55; box-shadow: 0 0 0 3px rgba(83, 128, 248, 0.06), 0 0 10px rgba(83, 128, 248, 0.22); }
    50% { opacity: 1; box-shadow: 0 0 0 7px rgba(83, 128, 248, 0.11), 0 0 24px rgba(83, 128, 248, 0.55); }
}

@keyframes ai-core-hover {
    0%, 100% { transform: translate(-50%, -50%) rotate(45deg) translateY(-4px) scale(0.985); }
    50% { transform: translate(-50%, -50%) rotate(45deg) translateY(5px) scale(1.025); }
}

@keyframes ai-scan {
    0%, 100% { top: 20%; opacity: 0; }
    18%, 82% { opacity: 1; }
    50% { top: 78%; opacity: 0.85; }
}

@keyframes ai-orbit-spin {
    from { transform: translate(-50%, -50%) rotate(var(--orbit-angle)); }
    to { transform: translate(-50%, -50%) rotate(calc(var(--orbit-angle) + var(--orbit-turn))); }
}

@keyframes ai-data-flow {
    to { transform: translateY(420%); }
}

@keyframes ai-particle-drift {
    0%, 100% { opacity: 0.25; transform: translate3d(0, 8px, 0) scale(0.7); }
    50% { opacity: 1; transform: translate3d(9px, -11px, 0) scale(1.25); }
}

@keyframes empty-spark-pulse {
    0%, 100% { opacity: 0.45; transform: scale(0.82) rotate(0); }
    50% { opacity: 1; transform: scale(1.16) rotate(12deg); }
}

@keyframes soft-nav-arrive {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes soft-workspace-arrive {
    from { opacity: 0; transform: translateY(12px) scale(0.994); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.soft-workbench .result-container {
    min-height: 0;
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    gap: 18px;
    padding: 94px 30px 16px;
    overflow-x: hidden;
    overflow-y: hidden;
    background: #fff;
}

.soft-workbench .result-intro {
    display: none;
}

.soft-workbench .result-intro h2 {
    margin: 0 0 3px;
    color: var(--text-primary);
    font-size: 19px;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.soft-workbench .result-intro p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 11px;
}

.soft-workbench .result-grid {
    width: min(100%, 720px, calc(100dvh - 346px));
    max-width: 720px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
    margin: 0 auto;
    aspect-ratio: auto;
}

.soft-workbench .result-run-summary {
    width: min(100%, 760px);
    margin: 0 auto 10px;
    padding: 8px 14px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
    background: #f7f8fb;
    border: 1px solid #e9ecf2;
    border-radius: 999px;
}

.soft-workbench .result-run-summary[hidden] {
    display: none;
}

.soft-workbench .result-item {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-self: start;
    height: auto;
    aspect-ratio: auto;
    padding: 0;
    overflow: hidden;
    cursor: zoom-in;
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(27, 39, 65, 0.055);
    transform: none;
    animation: none;
    transition:
        transform var(--sys-motion-base),
        border-color var(--sys-motion-fast),
        box-shadow var(--sys-motion-base),
        opacity var(--sys-motion-base);
    transition-delay: min(calc(var(--item-index, 0) * 30ms), 180ms);
}

.soft-workbench .result-item:hover,
.soft-workbench .result-item.selected {
    border-color: var(--sys-color-border-hover);
    box-shadow: var(--sys-shadow-card-hover);
    transform: translateY(-2px);
}

.soft-workbench .result-item.selected {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(71, 115, 244, 0.08), var(--sys-shadow-card-hover);
}

.soft-workbench .item-image-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--sys-color-surface-subtle);
    border-radius: 19px 19px 0 0;
}

.soft-workbench .item-image-wrapper:focus-visible {
    outline: 2px solid rgba(71, 115, 244, 0.55);
    outline-offset: -4px;
}

.soft-workbench .result-item .item-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    transition: transform var(--sys-motion-base);
}

.soft-workbench .result-item:hover .item-image-wrapper img {
    transform: scale(1.008);
}

.soft-workbench .item-overlay {
    display: none;
}

.soft-workbench .item-actions {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 14px;
    width: max-content;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(215, 222, 235, 0.9);
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(28, 39, 63, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px) saturate(1.08);
    -webkit-backdrop-filter: blur(16px) saturate(1.08);
    transform: translate(-50%, 8px) scale(0.97);
    transition:
        opacity 180ms ease,
        visibility 180ms ease,
        transform 220ms var(--sys-ease-out);
}

.soft-workbench .result-item:hover .item-actions,
.soft-workbench .result-item:focus-within .item-actions {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
}

.soft-workbench .result-item .action-btn {
    position: relative;
    width: auto;
    min-width: 76px;
    height: 36px;
    flex: 0 0 auto;
    gap: 6px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 11px;
    box-shadow: none;
}

.soft-workbench .result-item .action-btn::after {
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.soft-workbench .result-item .select-btn::after {
    content: '微调';
}

.soft-workbench .result-item .download-btn::after {
    content: '下载';
}

.soft-workbench .result-item .zoom-btn::after {
    content: '预览';
}

.soft-workbench .result-item .action-btn + .action-btn::before {
    content: none;
}

.soft-workbench .result-item .action-btn:hover,
.soft-workbench .result-item .action-btn.select-btn:hover,
.soft-workbench .result-item .action-btn.download-btn:hover,
.soft-workbench .result-item .action-btn.zoom-btn:hover {
    color: var(--accent-primary);
    background: var(--sys-color-primary-soft);
    border-color: transparent;
    box-shadow: none;
    transform: none;
}

.soft-workbench .item-index {
    display: none;
}

.soft-workbench .item-check {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: var(--accent-primary);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: var(--sys-shadow-sm);
}

.soft-workbench .result-item-hidden {
    opacity: 0;
    transform: translateY(6px);
}

.soft-workbench .result-item-visible {
    opacity: 1;
    transform: translateY(0);
}

.soft-workbench .result-status-content {
    width: 100%;
    padding: 28px 20px;
    text-align: center;
}

.soft-workbench .result-status-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sys-color-surface-subtle);
}

.soft-workbench .result-status-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    color: var(--text-secondary);
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
}

.soft-workbench .result-status-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 650;
}

.soft-workbench .result-status-description,
.soft-workbench .result-status-node {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.55;
}

/* Shared overlays and dialog surfaces */

.soft-workbench .modal-backdrop,
.soft-workbench .batch-overlay,
.soft-workbench .refine-overlay,
.soft-workbench .ai-panel-backdrop {
    background: rgba(20, 29, 46, 0.42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.soft-workbench .history-dialog,
.soft-workbench .batch-dialog,
.soft-workbench .analysis-center-frame,
.soft-workbench .analysis-center-frame-v4,
.soft-workbench .lightbox-content {
    color: var(--text-primary);
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 26px;
    box-shadow: var(--sys-shadow-dialog);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.soft-workbench .history-dialog-header,
.soft-workbench .batch-dialog-header,
.soft-workbench .analysis-center-topbar,
.soft-workbench .analysis-topbar-v4 {
    min-height: 72px;
    background: #fff;
    border-color: var(--sys-color-border);
}

.soft-workbench .dialog-close,
.soft-workbench .batch-close-btn,
.soft-workbench .analysis-center-close,
.soft-workbench .lightbox-close,
.soft-workbench .refine-close-btn {
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 12px;
    box-shadow: none;
}

.soft-workbench .dialog-close:hover,
.soft-workbench .batch-close-btn:hover,
.soft-workbench .analysis-center-close:hover,
.soft-workbench .lightbox-close:hover,
.soft-workbench .refine-close-btn:hover {
    color: var(--text-primary);
    background: var(--sys-color-surface-hover);
    border-color: var(--sys-color-border-strong);
    transform: none;
}

/* History */

.soft-workbench .history-dialog {
    width: min(1120px, calc(100vw - 48px));
    max-width: 1120px;
    max-height: calc(100dvh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.soft-workbench .history-premium-dialog::before {
    display: none;
}

.soft-workbench .history-dialog-header {
    padding: 14px 24px;
}

.soft-workbench .history-heading {
    gap: 12px;
}

.soft-workbench .history-icon-badge {
    width: 40px;
    height: 40px;
    color: var(--accent-primary);
    background: var(--sys-color-primary-soft);
    border: 0;
    border-radius: 12px;
    box-shadow: none;
}

.soft-workbench .history-title-wrap h2 {
    font-size: 20px;
    letter-spacing: -0.025em;
}

.soft-workbench .history-title-wrap p {
    color: var(--text-secondary);
    font-size: 11px;
}

.soft-workbench .history-dialog-body {
    min-height: 0;
    padding: 20px 24px 24px;
    overflow-y: auto;
    background: #fff;
}

.soft-workbench .history-summary-card {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--sys-color-surface-subtle);
    border: 1px solid var(--sys-color-border);
    border-radius: 16px;
    box-shadow: none;
}

.soft-workbench .history-summary-label {
    color: var(--accent-primary);
    background: transparent;
    border: 0;
    border-radius: 0;
}

.soft-workbench .history-list {
    gap: 16px;
}

.soft-workbench .history-record-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 20px;
    box-shadow: 0 7px 20px rgba(27, 39, 65, 0.04);
    transform: none;
}

.soft-workbench .history-record-card:hover,
.soft-workbench .history-record-card.is-expanded {
    border-color: var(--sys-color-border-hover);
    box-shadow: 0 14px 34px rgba(27, 39, 65, 0.08);
    transform: translateY(-2px);
}

.soft-workbench .history-record-summary {
    grid-template-columns: 112px minmax(0, 1fr) 28px;
    gap: 16px;
    padding: 14px;
    background: #fff;
}

.soft-workbench .history-record-summary:hover {
    background: var(--sys-color-surface-subtle);
}

.soft-workbench .history-record-preview {
    width: 112px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 15px;
    background: var(--sys-color-surface-muted);
}

.soft-workbench .history-record-preview img {
    border-radius: 0;
    object-fit: contain;
}

.soft-workbench .history-record-copy h3 {
    font-size: 14px;
    line-height: 1.5;
}

.soft-workbench .history-record-badge,
.soft-workbench .history-current-badge,
.soft-workbench .history-version-code,
.soft-workbench .history-inline-tag {
    border-radius: 999px;
    box-shadow: none;
}

.soft-workbench .history-record-timeline {
    padding: 18px 20px 20px;
    background: var(--sys-color-surface-subtle);
    border-top: 1px solid var(--sys-color-border);
}

.soft-workbench .history-version-list {
    gap: 16px;
}

.soft-workbench .history-version-node {
    grid-template-columns: 24px minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.soft-workbench .history-version-card {
    padding: 16px;
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 18px;
    box-shadow: none;
}

.soft-workbench .history-version-node:hover .history-version-card,
.soft-workbench .history-version-node.is-current .history-version-card {
    border-color: var(--sys-color-border-hover);
    box-shadow: none;
}

.soft-workbench .history-version-dot {
    box-shadow: 0 0 0 4px var(--sys-color-surface-subtle);
}

.soft-workbench .history-version-image {
    overflow: hidden;
    border: 1px solid var(--sys-color-border);
    border-radius: 14px;
}

.soft-workbench .history-version-image img {
    border-radius: 0;
    object-fit: contain;
}

.soft-workbench .history-version-image:hover img {
    transform: scale(1.01);
}

.soft-workbench .history-version-actions {
    gap: 8px;
}

.soft-workbench .history-version-btn,
.soft-workbench .history-record-action,
.soft-workbench .history-restore-btn {
    min-height: 44px;
    padding: 9px 14px;
    border-radius: 12px;
    box-shadow: none;
}

.soft-workbench .history-version-btn.primary,
.soft-workbench .history-restore-btn:not(.secondary) {
    color: #fff;
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.soft-workbench .history-version-btn.primary:hover:not(:disabled),
.soft-workbench .history-restore-btn:not(.secondary):hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: none;
}

.soft-workbench .history-loading-state,
.soft-workbench .history-version-empty,
.soft-workbench .analysis-history-empty {
    background: var(--sys-color-surface-subtle);
    border-color: var(--sys-color-border);
    border-radius: 12px;
}

/* Batch generation */

.soft-workbench .batch-dialog {
    width: min(1120px, calc(100vw - 48px));
    height: min(760px, calc(100dvh - 48px));
    min-height: min(620px, calc(100dvh - 48px));
    border-radius: 26px;
    transform: translateY(6px);
}

.soft-workbench .batch-overlay.active .batch-dialog {
    transform: translateY(0);
}

.soft-workbench .batch-dialog-header {
    padding: 14px 22px 14px 24px;
}

.soft-workbench .batch-heading h2 {
    color: var(--text-primary);
    font-size: 20px;
}

.soft-workbench .batch-heading p,
.soft-workbench .batch-section-header p,
.soft-workbench .batch-footer-summary {
    color: var(--text-secondary);
}

.soft-workbench .batch-count,
.soft-workbench .batch-phase-chip {
    min-height: 26px;
    border-color: var(--sys-color-border);
    border-radius: 999px;
    box-shadow: none;
}

.soft-workbench .batch-dialog-body {
    gap: 20px;
    padding: 24px;
    background: #f8f9fb;
}

.soft-workbench .batch-upload-section,
.soft-workbench .batch-prompt-section,
.soft-workbench .batch-progress-card {
    padding: 18px;
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 18px;
    box-shadow: 0 7px 20px rgba(27, 39, 65, 0.035);
}

.soft-workbench .batch-section-header {
    margin-bottom: 12px;
}

.soft-workbench .batch-section-header h3 {
    color: var(--text-primary);
    font-size: 14px;
}

.soft-workbench .batch-browse-btn,
.soft-workbench .batch-secondary-btn,
.soft-workbench .batch-download-btn,
.soft-workbench .batch-primary-btn,
.soft-workbench .batch-danger-btn {
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 10px;
    box-shadow: none;
}

.soft-workbench .batch-dropzone {
    position: relative;
    width: 100%;
    min-height: 146px;
    aspect-ratio: auto;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    margin: 0;
    padding: 24px 30px;
    overflow: hidden;
    text-align: left;
    background:
        radial-gradient(circle at 11% 22%, rgba(85, 132, 255, 0.11), transparent 25%),
        linear-gradient(135deg, #fbfdff 0%, #f5f8ff 100%);
    border: 1px dashed #b9c8ec;
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.soft-workbench .batch-dropzone::after {
    content: '';
    position: absolute;
    right: -36px;
    bottom: -50px;
    width: 148px;
    height: 148px;
    border: 1px solid rgba(83, 126, 243, 0.1);
    border-radius: 50%;
    box-shadow: 0 0 0 22px rgba(83, 126, 243, 0.035), 0 0 0 44px rgba(83, 126, 243, 0.02);
    pointer-events: none;
}

.soft-workbench .batch-dropzone:hover,
.soft-workbench .batch-dropzone:focus-visible,
.soft-workbench .batch-dropzone.dragging {
    background: var(--sys-color-primary-soft);
    border-color: var(--accent-primary);
    box-shadow: var(--sys-focus-ring);
}

.soft-workbench .batch-dropzone-icon {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dce5ff;
    border-radius: 20px;
    box-shadow: 0 10px 26px rgba(59, 99, 196, 0.1);
}

.soft-workbench .batch-dropzone-copy {
    position: relative;
    z-index: 1;
    max-width: 520px;
    align-items: flex-start;
    text-align: left;
}

.soft-workbench .batch-dropzone-copy strong {
    color: var(--text-primary);
    font-size: 15px;
}

.soft-workbench .batch-dropzone-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.soft-workbench .batch-dropzone-meta i {
    padding: 4px 8px;
    color: #607096;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(157, 177, 222, 0.34);
    border-radius: 999px;
    font-size: 10px;
    font-style: normal;
    line-height: 1.2;
}

.soft-workbench .batch-task-list {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 12px;
}

.soft-workbench .batch-task-item,
.soft-workbench .batch-add-tile {
    border-color: var(--sys-color-border);
    border-radius: 14px;
    box-shadow: none;
}

.soft-workbench .batch-add-tile {
    min-height: 0;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
}

.soft-workbench .batch-task-item:hover,
.soft-workbench .batch-task-item:focus-within {
    border-color: var(--sys-color-border-hover);
    box-shadow: var(--sys-shadow-xs);
    transform: translateY(-1px);
}

.soft-workbench .batch-task-preview {
    aspect-ratio: 1 / 1;
    border-radius: 13px 13px 0 0;
}

.soft-workbench .batch-task-preview img {
    object-fit: contain;
}

.soft-workbench .batch-prompt-section textarea {
    min-height: 112px;
    padding: 13px 14px;
    resize: none;
}

.soft-workbench .batch-progress-card {
    padding: 16px 18px;
    border: 1px solid var(--sys-color-border);
}

.soft-workbench .batch-progress-track {
    height: 6px;
    background: var(--sys-color-surface-muted);
}

.soft-workbench .batch-dialog-footer {
    min-height: 72px;
    padding: 12px 20px 12px 24px;
    border-color: var(--sys-color-border);
}

.soft-workbench .batch-primary-btn {
    color: #fff;
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.soft-workbench .batch-primary-btn:hover:not(:disabled) {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.soft-workbench .batch-reset-confirm {
    background: rgba(20, 29, 46, 0.34);
}

.soft-workbench .batch-reset-confirm-card {
    padding: 22px;
    border-color: var(--sys-color-border);
    border-radius: 16px;
    box-shadow: var(--sys-shadow-popover);
}

/* Refine workspace */

.soft-workbench .refine-overlay {
    padding: 16px;
    z-index: 380;
}

.soft-workbench .refine-editor-layout {
    width: calc(100vw - 32px);
    height: calc(100dvh - 32px);
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 330px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 26px;
    box-shadow: var(--sys-shadow-dialog);
}

.soft-workbench .refine-sidebar,
.soft-workbench .refine-right-panel,
.soft-workbench .refine-hud {
    background: #fff;
    border-color: var(--sys-color-border);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.soft-workbench .refine-sidebar {
    width: 84px;
    min-width: 84px;
    padding: 14px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f8f9fb;
    scrollbar-width: none;
}

.soft-workbench .refine-sidebar::-webkit-scrollbar {
    display: none;
}

.soft-workbench .sidebar-tool-btn {
    width: 58px;
    height: 44px;
    border-radius: 10px;
    box-shadow: none;
}

.soft-workbench .sidebar-tool-btn:hover {
    transform: none;
}

.soft-workbench .sidebar-tool-btn.active {
    color: var(--accent-primary);
    background: var(--sys-color-primary-soft);
    box-shadow: none;
}

.soft-workbench .sidebar-tool-btn:disabled {
    opacity: 0.32;
    cursor: not-allowed;
}

.soft-workbench .refine-canvas-area {
    min-width: 0;
    min-height: 0;
    background: #f3f5f8;
}

.soft-workbench .refine-canvas-container {
    background: #f3f5f8;
    border: 1px solid var(--sys-color-border);
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(31, 45, 72, 0.1);
}

.soft-workbench .refine-canvas-container.is-loading::after,
.soft-workbench .refine-canvas-container.is-error::after {
    position: absolute;
    z-index: 8;
    inset: 50% auto auto 50%;
    min-width: 180px;
    padding: 12px 16px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--sys-color-border);
    border-radius: 12px;
    box-shadow: var(--sys-shadow-sm);
    font-size: 12px;
    text-align: center;
    transform: translate(-50%, -50%);
}

.soft-workbench .refine-canvas-container.is-loading::after {
    content: '正在准备高清画布…';
}

.soft-workbench .refine-canvas-container.is-error::after {
    content: attr(data-error-message);
    color: var(--sys-color-danger);
}

.soft-workbench .refine-canvas-container::before {
    display: none;
    background-image: none;
}

.soft-workbench .refine-canvas-container canvas {
    border-radius: 18px;
    box-shadow: 0 16px 38px rgba(31, 45, 72, 0.12);
}

.soft-workbench .refine-hud {
    gap: 6px;
    padding: 6px;
    color: var(--text-secondary);
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 16px;
    box-shadow: var(--sys-shadow-sm);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.soft-workbench .refine-hud,
.soft-workbench .hud-info,
.soft-workbench .hud-actions,
.soft-workbench .hud-btn,
.soft-workbench .hud-hint {
    white-space: nowrap;
}

.soft-workbench .hud-info,
.soft-workbench .hud-actions,
.soft-workbench .hud-btn,
.soft-workbench .hud-hint {
    flex: 0 0 auto;
}

.soft-workbench .hud-info,
.soft-workbench .hud-btn,
.soft-workbench .hud-hint {
    color: var(--text-secondary);
    background: var(--sys-color-surface-subtle);
    border: 1px solid var(--sys-color-border);
    border-radius: 11px;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.soft-workbench .hud-info {
    padding: 7px 11px;
}

.soft-workbench .hud-btn {
    min-height: 34px;
    padding: 6px 10px;
}

.soft-workbench .hud-btn:hover {
    color: var(--accent-primary);
    background: var(--sys-color-primary-soft);
}

.soft-workbench .hud-hint {
    padding: 7px 10px;
    color: var(--text-tertiary);
}

.soft-workbench .hud-sep {
    color: var(--sys-color-border-strong);
}

.soft-workbench .hud-close {
    color: var(--text-secondary);
    background: #fff;
    border-color: var(--sys-color-border);
}

.soft-workbench .refine-right-panel {
    width: 330px;
    min-width: 330px;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.soft-workbench .refine-thumbnails-section,
.soft-workbench .refine-regions-section,
.soft-workbench .refine-input-section {
    padding: 20px;
}

.soft-workbench .refine-thumbnails-section,
.soft-workbench .refine-regions-section {
    border-bottom: 1px solid var(--sys-color-border);
}

.soft-workbench .thumbnail-item,
.soft-workbench .region-item {
    overflow: hidden;
    border-color: var(--sys-color-border);
    border-radius: 10px;
    box-shadow: none;
}

.soft-workbench .refine-thumb-item {
    aspect-ratio: 1 / 1;
}

.soft-workbench .refine-thumb-item img,
.soft-workbench .individual-preview img,
.soft-workbench .history-item-images img,
.soft-workbench .analysis-history-preview-images img {
    object-fit: contain;
}

.soft-workbench .analysis-history-preview-images img {
    aspect-ratio: 1 / 1;
}

.soft-workbench .refine-textarea {
    min-height: 112px;
    padding: 13px 14px;
    resize: none;
}

.soft-workbench .refine-send-btn {
    min-height: 46px;
    background: var(--accent-primary);
    border-radius: 12px;
    box-shadow: none;
}

.soft-workbench .refine-send-btn:hover {
    background: var(--accent-secondary);
    box-shadow: none;
    transform: none;
}

.soft-workbench .refine-quick-suggestion {
    min-height: 36px;
    border-radius: 10px;
    box-shadow: none;
}

.soft-workbench .popup-editor {
    background: #fff;
    border-color: var(--sys-color-border);
    border-radius: 16px;
    box-shadow: var(--sys-shadow-popover);
}

.soft-workbench .popup-textarea {
    min-height: 96px;
    resize: none;
}

.soft-workbench .region-edit-popup {
    min-width: 232px;
    max-width: 288px;
    overflow: visible;
    border-color: rgba(183, 198, 229, 0.78);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(23, 38, 72, 0.18), 0 8px 22px rgba(23, 38, 72, 0.08);
    transform-origin: var(--popup-arrow-left, 50%) top;
}

.soft-workbench .region-edit-popup.is-above {
    transform-origin: var(--popup-arrow-left, 50%) bottom;
}

.soft-workbench .region-edit-popup.is-below {
    transform-origin: var(--popup-arrow-left, 50%) top;
}

.soft-workbench .region-edit-popup.is-right {
    transform-origin: left var(--popup-arrow-top, 50%);
}

.soft-workbench .region-edit-popup.is-left {
    transform-origin: right var(--popup-arrow-top, 50%);
}

.soft-workbench .region-edit-popup .popup-arrow {
    left: var(--popup-arrow-left, 50%);
}

.soft-workbench .region-edit-popup.is-above .popup-arrow {
    top: auto;
    bottom: -8px;
    border-top: 0;
    border-left: 0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.soft-workbench .region-edit-popup.is-right .popup-arrow {
    top: var(--popup-arrow-top, 50%);
    bottom: auto;
    left: -8px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
    transform: translateY(-50%) rotate(45deg);
}

.soft-workbench .region-edit-popup.is-left .popup-arrow {
    top: var(--popup-arrow-top, 50%);
    right: -8px;
    bottom: auto;
    left: auto;
    border: 0;
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    transform: translateY(-50%) rotate(45deg);
}

.soft-workbench .region-edit-popup .popup-header {
    padding: 12px 14px 10px;
    border-color: var(--sys-color-border);
}

.soft-workbench .region-edit-popup .popup-content {
    padding: 12px 14px 14px;
}

.soft-workbench .region-edit-popup .popup-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(71, 115, 244, 0.12);
}

.soft-workbench #brushSizeSlider {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 108px;
    writing-mode: vertical-lr;
    direction: rtl;
    transform: none;
    background:
        linear-gradient(to top, var(--accent-primary) 0 var(--brush-progress, 26%), #d8dee8 var(--brush-progress, 26%) 100%) center / 4px 100% no-repeat;
    border-radius: 999px;
    cursor: ns-resize;
    touch-action: pan-x;
}

.soft-workbench .brush-size-panel {
    width: 60px;
    min-height: 174px;
    padding: 10px 6px;
    gap: 7px;
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 14px;
    transition: opacity var(--sys-motion-fast), border-color var(--sys-motion-fast), background-color var(--sys-motion-fast);
}

.soft-workbench .brush-size-panel.is-active {
    background: var(--sys-color-primary-soft);
    border-color: #cfdbff;
}

.soft-workbench .brush-size-panel.is-muted {
    opacity: 0.58;
}

.soft-workbench .brush-size-label {
    color: var(--text-tertiary);
    font-size: 9px;
    line-height: 1.25;
    text-align: center;
    text-transform: none;
}

.soft-workbench .brush-size-value {
    min-width: 32px;
    padding: 2px 7px;
    color: var(--accent-primary);
    background: #fff;
    border: 1px solid rgba(88, 129, 246, 0.18);
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.4;
}

.soft-workbench #brushSizeSlider::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    appearance: none;
    background: #fff;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    box-shadow: var(--sys-shadow-xs);
}

.soft-workbench #brushSizeSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    box-shadow: var(--sys-shadow-xs);
}

/* AI analysis workspace */

.soft-workbench .analysis-center-shell {
    overflow: hidden;
    border-radius: 26px;
}

.soft-workbench .analysis-center-frame,
.soft-workbench .analysis-center-frame-v4 {
    overflow: hidden;
    border-radius: 26px;
}

.soft-workbench .analysis-center-topbar,
.soft-workbench .analysis-topbar-v4 {
    padding: 16px 22px 16px 24px;
}

.soft-workbench .analysis-center-eyebrow,
.soft-workbench .analysis-entry-kicker,
.soft-workbench .analysis-center-card-kicker,
.soft-workbench .analysis-side-card-kicker {
    color: var(--accent-primary);
    letter-spacing: 0.06em;
}

.soft-workbench .analysis-center-title {
    color: var(--text-primary);
    font-size: 21px;
    letter-spacing: -0.025em;
}

.soft-workbench .analysis-center-subtitle,
.soft-workbench .analysis-center-card-meta,
.soft-workbench .analysis-center-followup-hint {
    color: var(--text-secondary);
}

.soft-workbench .analysis-session-pill,
.soft-workbench .analysis-inline-hint {
    min-height: 30px;
    padding: 5px 9px;
    background: var(--sys-color-surface-subtle);
    border: 1px solid var(--sys-color-border);
    border-radius: 9px;
    box-shadow: none;
}

.soft-workbench .analysis-center-body,
.soft-workbench .analysis-body-v4 {
    background: #fff;
}

.soft-workbench .analysis-mode-nav,
.soft-workbench .analysis-mode-nav-v4 {
    gap: 4px;
    padding: 4px;
    background: var(--sys-color-surface-subtle);
    border: 1px solid var(--sys-color-border);
    border-radius: 12px;
    box-shadow: none;
}

.soft-workbench .analysis-mode-tab {
    min-height: 40px;
    border-radius: 9px;
    box-shadow: none;
}

.soft-workbench .analysis-mode-tab.is-active {
    color: var(--accent-primary);
    background: var(--sys-color-primary-soft);
    box-shadow: none;
}

.soft-workbench .analysis-entry-hero,
.soft-workbench .analysis-entry-board,
.soft-workbench .analysis-entry-hero-v4,
.soft-workbench .analysis-command-board-v4,
.soft-workbench .analysis-followup-bar-v4,
.soft-workbench .candidate-review-card,
.soft-workbench .analysis-history-card,
.soft-workbench .analysis-center-context-card,
.soft-workbench .analysis-center-business-card,
.soft-workbench .analysis-center-note,
.soft-workbench .analysis-side-card,
.soft-workbench .ai-analysis-card,
.soft-workbench .ai-prompts-card,
.soft-workbench .ai-workspace-summary-card,
.soft-workbench .analysis-generated-hero-main,
.soft-workbench .analysis-generated-hero-side,
.soft-workbench .analysis-generated-board,
.soft-workbench .analysis-generated-review-column,
.soft-workbench .analysis-generated-action-column,
.soft-workbench .ai-report-section,
.soft-workbench .analysis-section-v4,
.soft-workbench .analysis-lane-card {
    background: #fff;
    border-color: var(--sys-color-border);
    border-radius: 20px;
    box-shadow: 0 7px 20px rgba(27, 39, 65, 0.035);
}

.soft-workbench .analysis-entry-hero-v4,
.soft-workbench .analysis-entry-hero {
    background: var(--sys-color-surface-subtle);
}

.soft-workbench .analysis-entry-hero-v4 {
    grid-template-columns: minmax(0, 0.8fr) minmax(460px, 1.2fr);
    gap: 20px;
    padding: 22px;
}

.soft-workbench .analysis-entry-title {
    margin-top: 8px;
    font-size: clamp(24px, 2.2vw, 30px);
    line-height: 1.2;
}

.soft-workbench .analysis-entry-desc {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.72;
}

.soft-workbench .analysis-entry-actions-v4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.soft-workbench .analysis-action-btn,
.soft-workbench .individual-action-btn,
.soft-workbench .analysis-followup-chip,
.soft-workbench .ai-prompt-option {
    border-radius: 10px;
    box-shadow: none;
    transform: none;
}

.soft-workbench .analysis-action-btn {
    min-height: 150px;
    padding: 18px;
    border-radius: 18px;
}

.soft-workbench .analysis-action-btn:hover:not(:disabled),
.soft-workbench .analysis-followup-chip:hover,
.soft-workbench .ai-prompt-option:hover {
    transform: none;
    box-shadow: none;
}

.soft-workbench .analysis-action-btn.primary:not(:disabled) {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.soft-workbench .analysis-center-stage,
.soft-workbench .ai-workspace-body,
.soft-workbench .analysis-stage-v4 {
    background: #fff;
}

.soft-workbench .analysis-history-list,
.soft-workbench .analysis-history-preview {
    background: #fff;
    border-color: var(--sys-color-border);
    border-radius: 16px;
    box-shadow: none;
}

.soft-workbench .analysis-center-followup,
.soft-workbench .analysis-followup-v4 {
    background: #fff;
    border-color: var(--sys-color-border);
    box-shadow: none;
}

.soft-workbench .analysis-center-followup-input {
    min-height: 46px;
    border-radius: 12px;
}

.soft-workbench .analysis-center-followup-send {
    min-width: 46px;
    min-height: 46px;
    background: var(--accent-primary);
    border-radius: 12px;
    box-shadow: none;
}

/* Lightbox, loading and feedback */

.soft-workbench .lightbox-content {
    border-radius: 20px;
}

.soft-workbench .lightbox-actions {
    border-radius: 12px;
    box-shadow: var(--sys-shadow-popover);
}

.soft-workbench .loading-overlay {
    background: rgba(20, 29, 46, 0.36);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.soft-workbench .loading-card {
    padding: 38px 48px;
    border: 1px solid var(--sys-color-border);
    border-radius: 20px;
    box-shadow: var(--sys-shadow-dialog);
}

.soft-workbench .toast,
.soft-workbench .toast-notification {
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 12px;
    box-shadow: var(--sys-shadow-popover);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Responsive */

@media (max-width: 1279px) {
    body.soft-workbench {
        --workbench-edge-x: 16px;
        --workbench-nav-gap: 16px;
        --workbench-bottom: 16px;
    }

    .soft-workbench .app-layout {
        height: auto;
        margin: 0;
        padding: 0;
        gap: 0;
    }

    .soft-workbench .sidebar,
    .soft-workbench .sidebar-inner {
        width: var(--sidebar-width);
    }

    .soft-workbench .sidebar {
        flex-basis: var(--sidebar-width);
    }

    .soft-workbench .upload-slot {
        min-height: 0;
        aspect-ratio: 1 / 1;
    }

    .soft-workbench .nav-btn {
        padding-inline: 9px;
    }
}

@media (max-height: 720px) and (min-width: 901px) {
    body.soft-workbench {
        --workbench-nav-top: 8px;
        --workbench-nav-height: 60px;
        --workbench-nav-gap: 8px;
        --workbench-bottom: 8px;
    }

    .soft-workbench .top-nav {
        border-radius: 18px;
    }

    .soft-workbench .canvas-toolbar {
        min-height: 62px;
        padding-block: 9px;
    }

    .soft-workbench .result-container {
        padding-top: 76px;
        padding-bottom: 12px;
    }

    .soft-workbench .result-grid {
        width: min(100%, 720px, calc(100dvh - 260px));
    }

    .soft-workbench .item-actions {
        min-height: 44px;
    }

    .soft-workbench .result-item .action-btn {
        height: 36px;
    }

    .soft-workbench .result-item .action-btn::after {
        display: none;
    }
}

@media (max-height: 720px) {
    body.soft-workbench {
        --sidebar-upload-size: clamp(76px, calc((100dvh - 430px) / 2), 150px);
    }

    .soft-workbench .sidebar-intro {
        padding-top: 9px;
        padding-bottom: 4px;
    }

    .soft-workbench .sidebar-intro p,
    .soft-workbench .placeholder-hint {
        display: none;
    }

    .soft-workbench .sidebar-intro h1 {
        margin-bottom: 0;
        font-size: 16px;
    }

    .soft-workbench .sidebar-section,
    .soft-workbench .sidebar-section:first-of-type {
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .soft-workbench .upload-stack {
        gap: 6px;
    }

    .soft-workbench .slot-placeholder {
        gap: 3px;
        padding: 6px;
    }

    .soft-workbench .placeholder-icon {
        width: clamp(30px, 5.3dvh, 40px);
        height: clamp(30px, 5.3dvh, 40px);
        border-radius: 13px;
    }

    .soft-workbench .placeholder-icon svg {
        width: clamp(19px, 3.5dvh, 27px);
        height: clamp(19px, 3.5dvh, 27px);
    }

    .soft-workbench .sidebar-section-heading {
        margin-bottom: 5px;
    }

    .soft-workbench .prompt-card {
        gap: 5px;
    }

    .soft-workbench .prompt-field {
        gap: 3px;
    }

    .soft-workbench .temperature-field {
        gap: 3px;
        padding: 6px 9px;
        border-radius: 12px;
    }

    .soft-workbench .temperature-slider-row {
        gap: 7px;
    }

    .soft-workbench .temperature-slider {
        height: 18px;
    }

    .soft-workbench .temperature-foot small {
        display: none;
    }

    .soft-workbench .temperature-heading output,
    .soft-workbench .temperature-slider-row > span,
    .soft-workbench .temperature-foot button {
        font-size: 10px;
    }

    .soft-workbench .field-label {
        font-size: 11px;
        line-height: 1.25;
    }

    .soft-workbench .prompt-select {
        min-height: 36px;
        height: 36px;
    }

    .soft-workbench .prompt-input {
        min-height: 54px;
        height: 54px;
        padding-top: 8px;
        padding-bottom: 23px;
    }

    .soft-workbench .prompt-char-count {
        bottom: 7px;
    }

    .soft-workbench .sidebar-footer {
        padding-top: 6px;
        padding-bottom: 7px;
    }

    .soft-workbench .generate-btn {
        min-height: 40px;
    }
}

@media (max-height: 800px) {
    .soft-workbench .ai-analyze-btn {
        min-height: 32px;
        margin-top: 4px;
    }
}

@media (min-height: 721px) and (max-height: 820px) and (min-width: 901px) {
    body.soft-workbench {
        --sidebar-upload-size: clamp(168px, calc((100dvh - 420px) / 2), 190px);
    }
}

@media (max-height: 560px) {
    .soft-workbench .sidebar-intro {
        display: none;
    }
}

@media (max-width: 1023px) and (min-width: 901px) {
    body.soft-workbench {
        --sidebar-width: 350px;
    }

    .soft-workbench .sidebar,
    .soft-workbench .sidebar-inner {
        width: var(--sidebar-width);
    }

    .soft-workbench .sidebar {
        flex-basis: var(--sidebar-width);
    }

    .soft-workbench .result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (hover: none), (pointer: coarse) {
    .soft-workbench .upload-clear-btn {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .soft-workbench .item-actions {
        opacity: 1;
        transform: none;
    }

    .soft-workbench .batch-remove-btn {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 900px) {
    body.soft-workbench {
        --workbench-edge-x: 8px;
        --workbench-nav-top: 8px;
        --workbench-nav-height: 64px;
        --workbench-nav-gap: 8px;
        --workbench-bottom: 8px;
        --sidebar-upload-size: clamp(60px, calc((100dvh - 610px) / 2), 207px);
    }

    .soft-workbench .top-nav {
        top: var(--workbench-nav-top);
        right: var(--workbench-edge-x);
        left: var(--workbench-edge-x);
        height: var(--workbench-nav-height);
        border-radius: 20px;
    }

    .soft-workbench .nav-right {
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .soft-workbench .nav-right::-webkit-scrollbar {
        display: none;
    }

    .soft-workbench .app-layout {
        height: auto;
        margin: 0;
        padding: 0;
        gap: 0;
        border-radius: 24px;
        /* The persisted entrance-animation transform would otherwise make
         * fixed drawer children use this panel as their containing block,
         * doubling the top offset when a PC browser is zoomed in. */
        animation: none;
        transform: none;
    }

    .soft-workbench .sidebar {
        position: fixed;
        top: 80px;
        bottom: 8px;
        left: 8px;
        z-index: 80;
        height: auto;
        max-height: none;
        width: min(420px, calc(100vw - 16px));
        flex-basis: auto;
        background: #fbfbfc;
        border: 1px solid var(--sys-color-border);
        border-radius: 24px;
        box-shadow: var(--sys-shadow-panel);
        opacity: 1;
        transform: translateX(0);
    }

    .soft-workbench .sidebar-inner {
        width: min(420px, calc(100vw - 16px));
        padding: 0;
    }

    .soft-workbench .sidebar.collapsed {
        width: min(420px, calc(100vw - 16px));
        border: 1px solid var(--sys-color-border);
        opacity: 0;
        transform: translateX(calc(-100% - 16px));
        pointer-events: none;
    }

    .soft-workbench .ai-analyze-btn {
        min-height: 32px;
        margin-top: 4px;
    }

    .soft-workbench .canvas-main {
        width: 100%;
        border-radius: 24px;
    }

    .soft-workbench .canvas-toolbar {
        flex-flow: row nowrap;
    }

    .soft-workbench .toolbar-left,
    .soft-workbench .toolbar-right {
        width: auto;
        justify-content: flex-start;
    }

    .soft-workbench .history-dialog,
    .soft-workbench .batch-dialog,
    .soft-workbench .analysis-center-frame,
    .soft-workbench .analysis-center-frame-v4 {
        width: calc(100vw - 16px);
        height: calc(100dvh - 16px);
        max-height: calc(100dvh - 16px);
        margin: 8px;
        border-radius: 20px;
    }

    .soft-workbench .batch-overlay,
    .soft-workbench .modal-backdrop {
        padding: 0;
    }

    .soft-workbench .refine-overlay {
        padding: 8px;
    }

    .soft-workbench .refine-editor-layout {
        width: calc(100vw - 16px);
        height: calc(100dvh - 16px);
        border-radius: 20px;
    }

    .soft-workbench .analysis-center-shell {
        inset: 8px;
        width: calc(100vw - 16px);
        height: calc(100dvh - 16px);
        border-radius: 20px;
    }

    .soft-workbench .analysis-center-frame,
    .soft-workbench .analysis-center-frame-v4 {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 20px;
    }

    .soft-workbench .analysis-center-topbar,
    .soft-workbench .analysis-topbar-v4 {
        position: relative;
        display: block;
        padding: 18px;
    }

    .soft-workbench .analysis-center-brand-copy {
        gap: 5px;
        padding-right: 48px;
    }

    .soft-workbench .analysis-center-title {
        font-size: 21px;
    }

    .soft-workbench .analysis-center-topbar-stack {
        justify-items: start;
        gap: 8px;
        margin-top: 12px;
    }

    .soft-workbench .analysis-center-session-strip,
    .soft-workbench .analysis-center-inline-hints {
        justify-content: flex-start;
        gap: 6px;
    }

    .soft-workbench .analysis-center-close {
        position: absolute;
        top: 16px;
        right: 16px;
        z-index: 2;
    }

    .soft-workbench .analysis-entry-hero-v4 {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 699px) {
    .soft-workbench .result-container {
        overflow-y: auto;
    }

    .soft-workbench .result-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }

    .soft-workbench .item-image-wrapper {
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .soft-workbench .result-item {
        transition-delay: 0ms;
    }
}

/* Readability pass for small supporting copy on the white workbench. */
.soft-workbench .analysis-action-btn.primary:not(:disabled) .action-hint {
    color: #fff;
}

.soft-workbench .analysis-hook-lab-card {
    grid-column: 1 / -1;
}

.soft-workbench .analysis-hook-lab {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.soft-workbench .analysis-hook-route {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 13px;
    background: linear-gradient(145deg, #fff 0%, #f7f9fd 100%);
    border: 1px solid #dce3ee;
    border-radius: 14px;
}

.soft-workbench .analysis-hook-route-head {
    display: flex;
    align-items: center;
    gap: 7px;
}

.soft-workbench .analysis-hook-route-head span {
    min-width: 25px;
    padding: 2px 6px;
    color: #4464b7;
    text-align: center;
    background: #edf2ff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
}

.soft-workbench .analysis-hook-route-head b {
    color: var(--text-secondary);
    font-size: 11px;
}

.soft-workbench .analysis-hook-route > strong {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.45;
}

.soft-workbench .analysis-hook-route p,
.soft-workbench .analysis-hook-route small,
.soft-workbench .analysis-hook-route em {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
    font-style: normal;
    line-height: 1.58;
}

.soft-workbench .analysis-hook-route p b {
    color: var(--text-primary);
}

.soft-workbench .analysis-hook-route small {
    padding-top: 6px;
    border-top: 1px solid #e4e9f1;
}

.soft-workbench .analysis-hook-route em {
    color: #8a5a23;
}

.soft-workbench .loading-hint {
    color: var(--text-secondary);
}

.soft-workbench .batch-section-header p,
.soft-workbench .batch-prompt-header > span,
.soft-workbench .batch-dropzone-copy span,
.soft-workbench .batch-task-meta,
.soft-workbench .batch-add-tile > span:last-child,
.soft-workbench .batch-prompt-hint,
.soft-workbench .batch-progress-copy span {
    color: var(--text-tertiary);
}

.soft-workbench .batch-section-header p,
.soft-workbench .batch-prompt-header > span,
.soft-workbench .batch-dropzone-copy span,
.soft-workbench .batch-prompt-hint,
.soft-workbench .batch-progress-copy span {
    font-size: 11px;
}

/* Complete history provenance: original inputs stay visible beside every
 * version chain instead of being silently present only in the JSON record. */
.soft-workbench .history-record-model {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.soft-workbench .history-record-source-state {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.soft-workbench .history-source-state-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    color: var(--text-tertiary);
    background: var(--sys-color-surface-subtle);
    border: 1px solid var(--sys-color-border);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 650;
}

.soft-workbench .history-source-state-chip.is-saved {
    color: #315b9d;
    background: #f2f6ff;
    border-color: #dce6fb;
}

.soft-workbench .history-source-assets {
    padding: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--sys-color-border);
    border-radius: 18px;
}

.soft-workbench .history-source-assets-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.soft-workbench .history-source-assets-head > div {
    display: grid;
    gap: 3px;
}

.soft-workbench .history-source-assets-head strong {
    color: var(--text-primary);
    font-size: 13px;
}

.soft-workbench .history-source-assets-head span,
.soft-workbench .history-source-assets-head em {
    color: var(--text-tertiary);
    font-size: 10px;
    font-style: normal;
}

.soft-workbench .history-source-assets-head em {
    flex: 0 0 auto;
    padding: 5px 8px;
    background: var(--sys-color-surface-subtle);
    border-radius: 999px;
}

.soft-workbench .history-source-assets-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.soft-workbench .history-source-asset {
    min-width: 0;
    min-height: 112px;
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    padding: 10px;
    color: inherit;
    text-align: left;
    background: #fff;
    border: 1px solid var(--sys-color-border);
    border-radius: 16px;
    font: inherit;
    transition: border-color 180ms ease, box-shadow 220ms ease, transform 220ms var(--sys-ease-out);
}

.soft-workbench button.history-source-asset {
    cursor: zoom-in;
}

.soft-workbench button.history-source-asset:hover:not(:disabled),
.soft-workbench button.history-source-asset:focus-visible {
    border-color: #bdccef;
    box-shadow: 0 10px 24px rgba(42, 66, 118, 0.08);
    outline: none;
    transform: translateY(-1px);
}

.soft-workbench .history-source-asset-media {
    position: relative;
    width: 90px;
    height: 90px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--sys-color-surface-subtle);
    border: 1px solid var(--sys-color-border);
    border-radius: 13px;
}

.soft-workbench .history-source-asset-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.soft-workbench .history-source-asset-media i,
.soft-workbench .history-source-asset.is-unavailable .history-source-asset-media::after {
    width: 28px;
    height: 28px;
    display: block;
    border: 1.5px solid #c9d2e1;
    border-radius: 9px;
    content: '';
    transform: rotate(-4deg);
}

.soft-workbench .history-source-asset-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.soft-workbench .history-source-asset-copy strong {
    color: var(--text-primary);
    font-size: 13px;
}

.soft-workbench .history-source-asset-copy small {
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.5;
}

.soft-workbench .history-source-asset-copy em {
    width: fit-content;
    color: #5270ad;
    font-size: 10px;
    font-style: normal;
    font-weight: 650;
}

.soft-workbench .history-source-asset.is-empty,
.soft-workbench .history-source-asset.is-unavailable {
    background: rgba(248, 250, 253, 0.78);
    border-style: dashed;
    box-shadow: none;
    opacity: 0.8;
}

.soft-workbench .history-source-asset.is-empty .history-source-asset-copy em,
.soft-workbench .history-source-asset.is-unavailable .history-source-asset-copy em {
    color: var(--text-tertiary);
}

.soft-workbench .history-inline-tag.is-muted {
    color: var(--text-tertiary);
    background: var(--sys-color-surface-subtle);
}

.soft-workbench .analysis-history-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 12px;
}

.soft-workbench .analysis-history-section-title span {
    color: var(--text-tertiary);
    font-size: 10px;
}

.soft-workbench .analysis-history-source-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.soft-workbench .analysis-history-source-asset {
    position: relative;
    min-width: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 0;
    aspect-ratio: 1 / 1;
    color: var(--text-secondary);
    background: var(--sys-color-surface-subtle);
    border: 1px solid var(--sys-color-border);
    border-radius: 16px;
    font: inherit;
}

.soft-workbench button.analysis-history-source-asset {
    cursor: zoom-in;
}

.soft-workbench .analysis-history-source-asset img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.soft-workbench .analysis-history-source-asset span {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 5px 8px;
    color: #3d527d;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(211, 220, 235, 0.9);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 650;
    backdrop-filter: blur(8px);
}

.soft-workbench .analysis-history-source-asset.is-empty {
    border-style: dashed;
}

.soft-workbench .analysis-history-source-asset.is-empty i {
    width: 30px;
    height: 30px;
    border: 1.5px solid #c9d2e1;
    border-radius: 10px;
    transform: rotate(-4deg);
}

.soft-workbench .analysis-history-preview-images button {
    overflow: hidden;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 18px;
    cursor: zoom-in;
}

@media (max-width: 700px) {
    .soft-workbench .history-source-assets-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .soft-workbench .history-source-asset {
        grid-template-columns: 76px minmax(0, 1fr);
        min-height: 96px;
    }

    .soft-workbench .history-source-asset-media {
        width: 76px;
        height: 76px;
    }
}

@media (max-width: 768px) {
    .soft-workbench .brand-mark {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 10px;
    }

    .soft-workbench .nav-btn {
        min-width: 42px;
        width: 42px;
        height: 42px;
        padding: 0;
        justify-content: center;
    }

    .soft-workbench .nav-btn span {
        display: none;
    }

    .soft-workbench .result-container {
        padding: 86px 16px 18px;
    }

    .soft-workbench .canvas-toolbar {
        min-height: 70px;
        flex-flow: row nowrap;
        padding: 10px 14px;
    }

    .soft-workbench .toolbar-left,
    .soft-workbench .toolbar-right {
        width: auto;
    }

    .soft-workbench .toolbar-right {
        margin-left: auto;
    }

    .soft-workbench .toolbar-icon {
        width: 36px;
        height: 36px;
    }

    .soft-workbench .result-intro p {
        display: none;
    }

    .soft-workbench .history-record-summary {
        grid-template-columns: 88px minmax(0, 1fr) 24px;
        gap: 12px;
        padding: 12px;
    }

    .soft-workbench .history-record-preview {
        width: 88px;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .soft-workbench .history-dialog-body {
        padding: 16px;
    }

    .soft-workbench .refine-editor-layout {
        display: flex;
        flex-direction: column;
    }

    .soft-workbench .refine-sidebar {
        width: 100%;
        min-width: 0;
        height: 100px;
        flex: 0 0 100px;
        flex-direction: column;
        gap: 5px;
        padding: 6px 8px;
        overflow-x: hidden;
        overflow-y: hidden;
        border-right: 0;
        border-bottom: 1px solid var(--sys-color-border);
        scrollbar-width: none;
    }

    .soft-workbench .refine-sidebar::-webkit-scrollbar {
        display: none;
    }

    .soft-workbench .sidebar-tools {
        width: 100%;
        min-height: 44px;
        flex: 0 0 44px;
        flex-direction: row;
        gap: 3px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }

    .soft-workbench .sidebar-tools::-webkit-scrollbar {
        display: none;
    }

    .soft-workbench .sidebar-tool-btn {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border-radius: 10px;
    }

    .soft-workbench .sidebar-divider {
        width: 1px;
        height: 24px;
        margin: 7px 3px;
    }

    .soft-workbench .brush-size-panel {
        width: 100%;
        min-width: 0;
        min-height: 38px;
        height: 38px;
        flex: 0 0 38px;
        flex-direction: row;
        gap: 9px;
        margin: 0;
        padding: 4px 10px;
    }

    .soft-workbench .brush-size-label {
        display: block;
        flex: 0 0 auto;
        font-size: 9px;
    }

    .soft-workbench .brush-size-panel input[type="range"] {
        width: auto;
        min-width: 96px;
        height: 20px;
        flex: 1 1 auto;
        writing-mode: horizontal-tb;
        direction: ltr;
        transform: none;
    }

    .soft-workbench .brush-size-value {
        min-width: 26px;
        padding-inline: 5px;
        font-size: 11px;
    }

    .soft-workbench .refine-canvas-area {
        min-height: 34dvh;
        flex: 1 1 auto;
    }

    .soft-workbench .refine-right-panel {
        width: 100%;
        min-width: 0;
        max-height: 42dvh;
        flex: 0 0 42dvh;
        border-top: 1px solid var(--sys-color-border);
        border-left: 0;
    }

    .soft-workbench .refine-hud {
        top: 12px;
        max-width: calc(100vw - 92px);
    }

    .soft-workbench .hud-info {
        padding: 6px 9px;
    }

    .soft-workbench .hud-info #hudCoords,
    .soft-workbench .hud-info .hud-sep,
    .soft-workbench .hud-actions #fitViewBtn,
    .soft-workbench .hud-hint {
        display: none;
    }

    .soft-workbench .refine-close-btn {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 520px) {
    .soft-workbench .top-nav {
        padding-inline: 7px;
    }

    .soft-workbench .nav-left {
        gap: 2px;
    }

    .soft-workbench .nav-brand {
        margin-left: 0;
    }

    .soft-workbench .brand-text {
        font-size: 17px;
    }

    .soft-workbench .sidebar-intro {
        padding-right: 20px;
        padding-left: 20px;
    }

    .soft-workbench .sidebar-section {
        padding-inline: 20px;
    }

    .soft-workbench .sidebar-footer {
        padding-right: 20px;
        padding-left: 20px;
    }

    .soft-workbench .upload-slot {
        min-height: 0;
        aspect-ratio: 1 / 1;
    }

    .soft-workbench .result-intro h2 {
        font-size: 16px;
    }

    .soft-workbench .toolbar-title > span:not(.toolbar-icon):not(.result-count) {
        display: none;
    }

    .soft-workbench .toolbar-btn {
        min-width: 40px;
        width: 40px;
        padding: 0;
    }

    .soft-workbench .toolbar-btn span {
        display: none;
    }

    .soft-workbench .result-item {
        border-radius: 18px;
    }

    .soft-workbench .item-image-wrapper {
        aspect-ratio: 1 / 1;
        border-radius: 17px 17px 0 0;
    }

    .soft-workbench .history-record-summary {
        grid-template-columns: minmax(0, 1fr) 24px;
    }

    .soft-workbench .history-record-preview {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        grid-column: 1 / -1;
    }

    .soft-workbench .history-version-actions,
    .soft-workbench .batch-footer-actions {
        flex-wrap: wrap;
    }

    .soft-workbench .history-version-btn {
        flex: 1 1 100%;
    }

    .soft-workbench .batch-dialog-footer {
        align-items: flex-end;
    }

    .soft-workbench .batch-footer-summary {
        white-space: normal;
    }

    .soft-workbench .canvas-empty {
        padding: 14px;
    }

    .soft-workbench .empty-content {
        width: 100%;
        gap: 8px;
        padding: 8px 8px 18px;
    }

    .soft-workbench .empty-motion-stage {
        width: min(330px, 100%);
        height: 248px;
    }

    .soft-workbench .ai-compose-stage {
        border-radius: 28px;
    }

    .soft-workbench .ai-compose-stage .compose-source {
        left: 1%;
        transform: translateY(-50%) scale(0.72);
        transform-origin: left center;
    }

    .soft-workbench .ai-compose-stage .compose-output {
        right: 1%;
        transform: translateY(-50%) scale(0.72);
        transform-origin: right center;
    }

    .soft-workbench .ai-compose-stage .compose-engine {
        width: 148px;
        height: 148px;
    }

    .soft-workbench .ai-compose-stage .engine-frame {
        inset: 23px;
        border-radius: 23px;
    }

    .soft-workbench .ai-compose-stage .composition-grid {
        inset: 13px;
    }

    .soft-workbench .ai-compose-stage .composition-subject {
        top: 29px;
        width: 38px;
        height: 46px;
    }

    .soft-workbench .ai-compose-stage .engine-caption,
    .soft-workbench .ai-compose-stage .compose-stage-label {
        display: none;
    }

    .soft-workbench .ai-compose-stage .compose-link-in { left: 18%; }
    .soft-workbench .ai-compose-stage .compose-link-out { right: 18%; }

    .soft-workbench .ai-vision-core {
        width: 116px;
    }

    .soft-workbench .ai-orbit-alpha { width: 61%; height: 50%; }
    .soft-workbench .ai-orbit-beta { width: 82%; height: 36%; }
    .soft-workbench .ai-orbit-gamma { width: 96%; height: 63%; }

    .soft-workbench .empty-title {
        font-size: 23px;
    }

    .soft-workbench .empty-desc {
        max-width: 310px;
        font-size: 12px;
    }

    .soft-workbench .empty-steps {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
        padding: 6px;
    }

    .soft-workbench .step-item {
        min-width: 0;
        flex-direction: column;
        gap: 3px;
        padding: 5px 2px;
        font-size: 10px;
        white-space: normal;
    }

    .soft-workbench .step-divider {
        display: none;
    }

    .soft-workbench .batch-dropzone {
        min-height: 196px;
        flex-direction: column;
        gap: 12px;
        padding: 20px;
        text-align: center;
    }

    .soft-workbench .batch-dropzone-copy {
        align-items: center;
        text-align: center;
    }

    .soft-workbench .batch-dropzone-meta {
        justify-content: center;
    }

    .soft-workbench .history-summary-card {
        display: none;
    }

    .soft-workbench .history-title-wrap p {
        display: none;
    }

    .soft-workbench .analysis-entry-hero-v4 {
        padding: 16px;
    }

    .soft-workbench .analysis-entry-title {
        font-size: 23px;
    }

    .soft-workbench .analysis-entry-actions-v4 {
        grid-template-columns: minmax(0, 1fr);
    }

    .soft-workbench .analysis-action-btn {
        min-height: 0;
    }
}

@media (min-width: 521px) and (max-width: 768px) {
    .soft-workbench .brand-text {
        display: inline;
    }
}

@media (prefers-reduced-motion: reduce) {
    .soft-workbench *,
    .soft-workbench *::before,
    .soft-workbench *::after {
        scroll-behavior: auto;
        animation-duration: 1ms;
        animation-iteration-count: 1;
        transition-duration: 1ms;
    }

    .soft-workbench .result-item-hidden,
    .soft-workbench .result-item-visible,
    .soft-workbench .batch-dialog {
        transform: none;
    }
}

/* AI infinity canvas — live generative composition, independent of CSS motion settings */
.soft-workbench .empty-content {
    width: min(1320px, 100%);
    box-sizing: border-box;
    margin: auto;
    align-self: center;
    text-align: center;
    /* The stage contains intentional breathing room around the ink. Lift the
     * complete composition slightly so its visible pixels—not its invisible
     * box—sit on the workspace's vertical optical center. */
    transform: translateY(clamp(-36px, -3.3dvh, -12px));
}

.soft-workbench .empty-motion-stage.ai-infinity-stage {
    position: relative;
    width: min(clamp(900px, 52vw, 1240px), 100%);
    height: clamp(230px, 36dvh, 370px);
    flex: 0 0 auto;
    isolation: isolate;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    perspective: none;
    transform: translateZ(0);
    contain: layout paint;
    margin-right: auto;
    margin-left: auto;
}

.soft-workbench .empty-motion-stage.ai-infinity-stage::before,
.soft-workbench .empty-motion-stage.ai-infinity-stage::after {
    display: none;
    content: none;
}

.soft-workbench .ai-infinity-canvas {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    filter: none;
    -webkit-mask-image: none;
    mask-image: none;
}

.soft-workbench .empty-copy .empty-desc {
    margin-top: 0;
}

/* Keep every visible layer on one optical axis. The Canvas renderer centers
 * the ink bounds; these rules center the stage, copy and progress rail. */
.soft-workbench .empty-copy {
    margin-right: auto;
    margin-left: auto;
}

.soft-workbench .empty-copy .empty-desc {
    color: #5f6c82;
    letter-spacing: 0.008em;
}

.soft-workbench .empty-copy .compose-steps {
    margin-right: auto;
    margin-left: auto;
}

@media (max-height: 720px) and (min-width: 901px) {
    .soft-workbench .empty-content {
        gap: 6px;
        padding-top: 4px;
        padding-bottom: 8px;
    }

    .soft-workbench .empty-motion-stage.ai-infinity-stage {
        width: min(760px, 100%);
        height: clamp(196px, 35dvh, 248px);
        border-radius: 0;
    }

    .soft-workbench .empty-kicker {
        margin-bottom: 4px;
    }

    .soft-workbench .empty-title {
        font-size: clamp(23px, 2.15vw, 29px);
    }

    .soft-workbench .empty-desc {
        margin-top: 5px;
        line-height: 1.55;
    }

    .soft-workbench .compose-steps {
        margin-top: 8px;
    }
}

@media (max-width: 520px) {
    .soft-workbench .empty-motion-stage.ai-infinity-stage {
        width: 100%;
        height: 248px;
        border-radius: 0;
    }
}

/* =========================================================
 * Fluid PC viewport fit
 * Browser zoom changes the CSS viewport. These fluid values keep the fixed
 * workbench balanced from an effective 960×540 up to ultrawide canvases.
 * ========================================================= */

body.soft-workbench {
    --workbench-edge-x: clamp(12px, 1.25vw, 24px);
    --workbench-nav-top: clamp(8px, 1.67dvh, 18px);
    --workbench-nav-height: clamp(58px, 6.67dvh, 72px);
    --workbench-nav-gap: clamp(8px, 1.85dvh, 20px);
    --workbench-bottom: clamp(8px, 1.67dvh, 18px);
    --sidebar-width: clamp(320px, calc(280px + 4.2vw), 360px);
}

@media (min-height: 901px) {
    body.soft-workbench {
        --sidebar-upload-size: clamp(190px, calc((100dvh - 528px) / 2), 306px);
    }
}

@media (max-height: 1100px) and (min-height: 901px) {
    .soft-workbench .temperature-field {
        gap: 4px;
        padding: 7px 10px 6px;
    }

    .soft-workbench .prompt-input {
        height: 72px;
        min-height: 72px;
    }

    .soft-workbench .prompt-select {
        min-height: 40px;
    }
}

@media (max-height: 900px) and (min-height: 721px) {
    .soft-workbench .sidebar-section,
    .soft-workbench .sidebar-section:first-of-type {
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .soft-workbench .upload-stack,
    .soft-workbench .prompt-card {
        gap: 6px;
    }

    .soft-workbench .temperature-field {
        gap: 3px;
        padding: 6px 9px;
        border-radius: 12px;
    }

    .soft-workbench .temperature-slider {
        height: 18px;
    }

    .soft-workbench .temperature-foot small,
    .soft-workbench .placeholder-hint {
        display: none;
    }

    .soft-workbench .prompt-select {
        min-height: 36px;
        height: 36px;
    }

    .soft-workbench .prompt-input {
        min-height: 58px;
        height: 58px;
        padding-top: 8px;
        padding-bottom: 23px;
    }
}

@media (max-height: 720px) and (min-width: 901px) {
    body.soft-workbench {
        --workbench-nav-top: 8px;
        --workbench-nav-height: clamp(54px, 8.3dvh, 60px);
        --workbench-nav-gap: 8px;
        --workbench-bottom: 8px;
        --sidebar-upload-size: clamp(78px, calc((100dvh - 390px) / 2), 165px);
    }
}

@media (max-width: 900px) {
    body.soft-workbench {
        --workbench-edge-x: 8px;
        --workbench-nav-top: 8px;
        --workbench-nav-height: 64px;
        --workbench-nav-gap: 8px;
        --workbench-bottom: 8px;
    }
}

/* Softer window hierarchy */
.soft-workbench .top-nav {
    border-radius: 26px;
}

.soft-workbench .app-layout {
    border-radius: 34px;
}

.soft-workbench .history-dialog,
.soft-workbench .batch-dialog,
.soft-workbench .analysis-center-frame,
.soft-workbench .analysis-center-frame-v4,
.soft-workbench .analysis-dialog-v2,
.soft-workbench .lightbox-content,
.soft-workbench .refine-editor-layout {
    border-radius: 34px;
}

.soft-workbench .history-summary-card,
.soft-workbench .history-record-card,
.soft-workbench .batch-upload-section,
.soft-workbench .batch-prompt-section,
.soft-workbench .batch-progress-card,
.soft-workbench .analysis-entry-hero-v4,
.soft-workbench .analysis-center-summary-card,
.soft-workbench .loading-card {
    border-radius: 22px;
}

.soft-workbench .batch-reset-confirm-card,
.soft-workbench .region-edit-popup,
.soft-workbench .analysis-history-preview,
.soft-workbench .analysis-center-followup {
    border-radius: 24px;
}

.soft-workbench .prompt-select,
.soft-workbench .prompt-input,
.soft-workbench .batch-prompt-section textarea,
.soft-workbench .refine-textarea,
.soft-workbench .popup-textarea,
.soft-workbench .analysis-center-followup-input {
    border-radius: 17px;
}

/* =========================================================
 * Expanded batch workspace
 * The desktop body is a fixed two-column composition, so all controls remain
 * visible without an internal vertical scrollbar.
 * ========================================================= */

.soft-workbench .batch-overlay {
    padding: clamp(8px, 1.2vw, 20px);
}

.soft-workbench .batch-dialog {
    width: min(1480px, calc(100vw - 32px));
    height: min(900px, calc(100dvh - 32px));
    min-height: 0;
    max-height: calc(100dvh - 16px);
    border-radius: 34px;
}

.soft-workbench .batch-dialog-header {
    min-height: 76px;
    padding: 15px 24px 15px 28px;
}

.soft-workbench .batch-dialog-body {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(330px, 0.9fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 20px;
    overflow: hidden;
    background: #f7f9fc;
}

.soft-workbench .batch-upload-section {
    grid-row: 1 / 3;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.soft-workbench .batch-prompt-section {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.soft-workbench .batch-progress-card {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
}

.soft-workbench .batch-upload-section,
.soft-workbench .batch-prompt-section,
.soft-workbench .batch-progress-card {
    padding: 20px;
    border-radius: 22px;
}

.soft-workbench .batch-dropzone {
    min-height: 0;
    flex: 1 1 auto;
    padding: 32px;
    border-radius: 24px;
}

.soft-workbench .batch-dropzone-icon {
    width: 70px;
    height: 70px;
    flex-basis: 70px;
    border-radius: 23px;
}

.soft-workbench .batch-task-list {
    min-height: 0;
    height: auto;
    flex: 0 1 auto;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: auto;
    align-content: start;
    align-items: start;
    gap: 10px;
    overflow: hidden;
}

.soft-workbench .batch-task-item,
.soft-workbench .batch-add-tile {
    min-height: 0;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
}

.soft-workbench .batch-task-item {
    display: block;
    background: #f6f8fc;
    border-color: #e1e6ef;
    box-shadow: 0 1px 2px rgba(27, 39, 65, 0.03);
}

.soft-workbench .batch-task-preview {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 15px;
}

.soft-workbench .batch-task-copy {
    position: absolute;
    z-index: 3;
    right: 6px;
    bottom: 6px;
    left: 6px;
    min-height: 42px;
    padding: 7px 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(222, 228, 239, 0.82);
    border-radius: 11px;
    box-shadow: 0 5px 16px rgba(33, 48, 81, 0.08);
    backdrop-filter: blur(10px);
    transition: transform 180ms ease, background-color 180ms ease;
}

.soft-workbench .batch-task-item:hover .batch-task-copy,
.soft-workbench .batch-task-item:focus-within .batch-task-copy {
    background: rgba(255, 255, 255, 0.97);
    transform: translateY(-1px);
}

.soft-workbench .batch-task-name {
    font-size: 9px;
}

.soft-workbench .batch-task-meta {
    margin-top: 1px;
    font-size: 8px;
}

.soft-workbench .batch-task-index {
    top: 7px;
    left: 7px;
    min-width: 25px;
    height: 22px;
    border-radius: 8px;
    backdrop-filter: blur(8px);
}

.soft-workbench .batch-task-status {
    top: 7px;
    right: 7px;
    bottom: auto;
    left: auto;
}

.soft-workbench .batch-remove-btn {
    top: 34px;
    right: 7px;
    border-radius: 8px;
}

.soft-workbench .batch-add-tile {
    min-height: 0;
    padding: 10px;
    gap: 5px;
    background:
        radial-gradient(circle at 50% 42%, rgba(83, 126, 243, 0.08), transparent 42%),
        #fbfcff;
    border-color: #cbd6e8;
}

.soft-workbench .batch-add-tile-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    box-shadow: 0 6px 18px rgba(73, 110, 202, 0.08);
}

.soft-workbench .batch-prompt-section textarea {
    min-height: 132px;
    flex: 1 1 auto;
}

.soft-workbench .batch-dialog-footer {
    min-height: 76px;
    padding: 13px 24px 13px 28px;
}

.soft-workbench .batch-browse-btn,
.soft-workbench .batch-secondary-btn,
.soft-workbench .batch-download-btn,
.soft-workbench .batch-primary-btn,
.soft-workbench .batch-danger-btn {
    border-radius: 14px;
}

@media (max-height: 820px) and (min-width: 701px) {
    .soft-workbench .batch-dialog {
        width: calc(100vw - 16px);
        height: calc(100dvh - 16px);
    }

    .soft-workbench .batch-dialog-header,
    .soft-workbench .batch-dialog-footer {
        min-height: 60px;
        padding-block: 8px;
    }

    .soft-workbench .batch-dialog-body {
        grid-template-columns: minmax(0, 1.72fr) minmax(300px, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .soft-workbench .batch-upload-section,
    .soft-workbench .batch-prompt-section,
    .soft-workbench .batch-progress-card {
        padding: 14px;
        border-radius: 18px;
    }

    .soft-workbench .batch-section-header {
        margin-bottom: 8px;
    }

    .soft-workbench .batch-dropzone {
        padding: 18px;
        border-radius: 19px;
    }

    .soft-workbench .batch-dropzone-icon {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
        border-radius: 18px;
    }

    .soft-workbench .batch-prompt-section textarea {
        min-height: 62px;
        padding: 10px 12px;
    }

    .soft-workbench .batch-prompt-hint {
        margin-top: 4px;
        line-height: 1.25;
    }

    .soft-workbench .batch-progress-card {
        padding-block: 11px;
    }

    .soft-workbench .batch-task-list {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 7px;
    }

    .soft-workbench .batch-task-copy {
        right: 4px;
        bottom: 4px;
        left: 4px;
        min-height: 0;
        padding: 4px 5px;
        border-radius: 8px;
    }

    .soft-workbench .batch-task-meta,
    .soft-workbench .batch-add-tile > span:last-child {
        display: none;
    }

    .soft-workbench .batch-task-name,
    .soft-workbench .batch-add-tile strong {
        font-size: 8px;
    }

    .soft-workbench .batch-add-tile-icon {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }
}

@media (max-width: 700px) {
    .soft-workbench .batch-dialog-body {
        display: flex;
        overflow-y: auto;
    }
}

@media (max-width: 900px) {
    .soft-workbench .top-nav,
    .soft-workbench .app-layout,
    .soft-workbench .history-dialog,
    .soft-workbench .batch-dialog,
    .soft-workbench .analysis-center-frame,
    .soft-workbench .analysis-center-frame-v4,
    .soft-workbench .refine-editor-layout {
        border-radius: 26px;
    }
}

@media (min-width: 901px) and (max-width: 1023px) {
    .soft-workbench .sidebar {
        position: relative;
        inset: auto;
        z-index: auto;
        height: auto;
        transform: none;
    }

    .soft-workbench .sidebar.collapsed {
        width: 0;
        transform: none;
    }

    .soft-workbench .canvas-main {
        width: auto;
        margin-left: 0;
        flex: 1 1 auto;
    }

    body.soft-workbench.sidebar-open::after,
    body.soft-workbench::after {
        display: none;
    }
}

/* =========================================================
 * Adaptive generated-result composition
 * One, two and three images stay as a centered presentation row; denser
 * result sets progressively move to balanced 2/3/4-column grids. The
 * viewport-height limits preserve the fixed, non-scrolling PC workbench.
 * ========================================================= */

.soft-workbench .result-container {
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: hidden;
}

.soft-workbench .result-grid {
    --result-columns: 2;
    --result-grid-max: 780px;
    --result-grid-vh: calc(100dvh - 346px);
    width: min(100%, var(--result-grid-max), var(--result-grid-vh));
    max-width: none;
    flex: 0 0 auto;
    align-self: center;
    grid-template-columns: repeat(var(--result-columns), minmax(0, 1fr)) !important;
    margin: auto;
    transition: width 320ms var(--sys-ease-out), gap 220ms var(--sys-ease-out);
}

.soft-workbench .result-grid[data-result-layout="single"] {
    --result-grid-max: 560px;
    --result-grid-vh: calc(100dvh - 224px);
}

.soft-workbench .result-grid[data-result-layout="pair"] {
    --result-grid-max: 1000px;
    --result-grid-vh: calc(200dvh - 448px);
}

.soft-workbench .result-grid[data-result-layout="trio"] {
    --result-grid-max: 1200px;
    --result-grid-vh: calc(300dvh - 672px);
}

.soft-workbench .result-grid[data-result-layout="quad"] {
    --result-grid-max: 780px;
    --result-grid-vh: calc(100dvh - 346px);
}

.soft-workbench .result-grid[data-result-layout="six"] {
    --result-grid-max: 1040px;
    --result-grid-vh: calc(150dvh - 522px);
}

.soft-workbench .result-grid[data-result-layout="eight"] {
    --result-grid-max: 1280px;
    --result-grid-vh: calc(200dvh - 666px);
}

.soft-workbench .result-grid[data-result-layout="many"] {
    --result-grid-max: 1180px;
    --result-grid-vh: calc(133.333dvh - 520px);
    gap: 14px;
}

@media (max-height: 720px) and (min-width: 700px) {
    .soft-workbench .result-grid[data-result-layout="quad"] {
        --result-grid-vh: calc(100dvh - 276px);
    }

    .soft-workbench .result-grid[data-result-layout="six"] {
        --result-grid-vh: calc(150dvh - 423px);
    }

    .soft-workbench .result-grid[data-result-layout="eight"] {
        --result-grid-vh: calc(200dvh - 534px);
    }

    .soft-workbench .result-grid[data-result-layout="many"] {
        --result-grid-vh: calc(133.333dvh - 431px);
    }
}

@media (max-width: 699px) {
    .soft-workbench .result-container {
        overflow-y: auto;
    }

    .soft-workbench .result-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) !important;
        margin: 0 auto;
    }
}

/* Floating capsule navigation — the menu is the capsule, not the whole bar. */
.soft-workbench .top-nav {
    top: calc(var(--workbench-nav-top) + 12px);
    right: 0;
    left: 0;
    width: calc(100vw - var(--workbench-edge-x) - var(--workbench-edge-x));
    margin-right: auto;
    margin-left: auto;
    padding: 0 18px;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Extend the system surface behind the floating navigation. Functional
 * sections receive the same offset that the workspace gains, so their
 * on-screen positions and available height remain unchanged. */
.soft-workbench .app-layout {
    top: var(--workbench-nav-top);
}

@media (min-width: 901px) {
    .soft-workbench .sidebar-inner {
        padding-top: calc(var(--workbench-nav-height) + var(--workbench-nav-gap));
    }
}

.soft-workbench .canvas-empty,
.soft-workbench .canvas-loading-state {
    padding-top: calc(34px + var(--workbench-nav-height) + var(--workbench-nav-gap));
}

.soft-workbench .canvas-toolbar {
    top: calc(var(--workbench-nav-height) + var(--workbench-nav-gap));
}

.soft-workbench .result-container {
    padding-top: calc(94px + var(--workbench-nav-height) + var(--workbench-nav-gap));
}

.soft-workbench .nav-left {
    flex: 0 0 auto;
    gap: 7px;
}

.soft-workbench .nav-left .nav-btn.icon-btn {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    color: #53627a;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 13px;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.soft-workbench .nav-left .nav-btn.icon-btn:hover {
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(210, 218, 231, 0.76);
    box-shadow: 0 6px 16px rgba(31, 45, 72, 0.055);
}

.soft-workbench .nav-brand {
    margin-left: 0;
}

.soft-workbench .brand-text {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.045em;
}

.soft-workbench .nav-right {
    min-width: 0;
    flex: 0 1 auto;
    justify-content: flex-start;
    gap: 2px;
    padding: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--sys-color-border);
    border-radius: 999px;
    box-shadow:
        0 9px 24px rgba(31, 45, 72, 0.072),
        0 2px 5px rgba(31, 45, 72, 0.026),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px) saturate(1.06);
    -webkit-backdrop-filter: blur(16px) saturate(1.06);
}

.soft-workbench .nav-right .nav-btn {
    min-height: 40px;
    flex: 0 0 auto;
    padding: 0 13px;
    color: #56647a;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 620;
}

.soft-workbench .nav-right .nav-btn:hover {
    color: #27344b;
    background: #f2f5fa;
    border-color: transparent;
    box-shadow: none;
    transform: none;
}

.soft-workbench .nav-right .nav-btn.ai-active,
.soft-workbench .nav-right .nav-btn.main-eval-active,
.soft-workbench .nav-right .nav-btn.batch-active,
.soft-workbench .nav-right .nav-btn.history-active,
.soft-workbench .nav-right .nav-btn.refine-active {
    color: #315ccc;
    background: #edf2ff;
    border-color: transparent;
    box-shadow: inset 0 0 0 1px rgba(73, 113, 222, 0.08);
}

@media (max-width: 768px) {
    .soft-workbench .top-nav {
        top: calc(var(--workbench-nav-top) + 10px);
        width: calc(100vw - 32px);
        height: 56px;
        gap: 1px;
        padding: 5px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid var(--sys-color-border);
        border-radius: 999px;
        box-shadow:
            0 8px 22px rgba(31, 45, 72, 0.068),
            inset 0 1px 0 rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(16px) saturate(1.06);
        -webkit-backdrop-filter: blur(16px) saturate(1.06);
    }

    .soft-workbench .nav-brand {
        display: none;
    }

    .soft-workbench .nav-left {
        flex: 0 0 40px;
    }

    .soft-workbench .nav-left .nav-btn.icon-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        flex-basis: 40px;
    }

    .soft-workbench .nav-right {
        flex: 1 1 auto;
        gap: 0;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .soft-workbench .nav-right .nav-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        justify-content: center;
    }

    .soft-workbench .result-container {
        padding-top: calc(86px + var(--workbench-nav-height) + var(--workbench-nav-gap));
    }
}

@media (max-width: 520px) {
    .soft-workbench .canvas-empty,
    .soft-workbench .canvas-loading-state {
        padding-top: calc(14px + var(--workbench-nav-height) + var(--workbench-nav-gap));
    }
}

@media (max-height: 720px) and (min-width: 901px) {
    .soft-workbench .result-container {
        padding-top: calc(76px + var(--workbench-nav-height) + var(--workbench-nav-gap));
    }
}

/* Intentional history empty state instead of a lone line in a large dialog. */
.soft-workbench .history-list:has(> .history-empty-state) {
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
}

.soft-workbench .history-empty-state {
    min-height: clamp(260px, 38dvh, 380px);
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    padding: 34px 24px;
    color: var(--text-secondary);
    text-align: center;
    background:
        radial-gradient(circle at 50% 38%, rgba(80, 116, 230, 0.075), transparent 28%),
        linear-gradient(180deg, #fbfcff 0%, #f7f9fc 100%);
    border: 1px dashed #d5deec;
    border-radius: 20px;
}

.soft-workbench .history-empty-visual {
    position: relative;
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    margin-bottom: 4px;
    color: #5676d4;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dce4f3;
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(50, 73, 126, 0.09), inset 0 1px 0 #fff;
}

.soft-workbench .history-empty-visual i {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #6c8ce6;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(82, 119, 222, 0.09);
    animation: history-empty-pulse 2.6s ease-in-out infinite;
}

.soft-workbench .history-empty-state strong {
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 680;
}

.soft-workbench .history-empty-state p {
    max-width: 460px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.7;
}

.soft-workbench .history-empty-tip {
    margin-top: 3px;
    padding: 5px 10px;
    color: #71809a;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #e0e6f0;
    border-radius: 999px;
    font-size: 10px;
}

@keyframes history-empty-pulse {
    0%, 100% { opacity: 0.55; transform: scale(0.82); }
    50% { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 520px) {
    .soft-workbench .history-dialog-body:has(.history-empty-state) {
        overflow: hidden;
    }

    .soft-workbench .history-empty-state {
        min-height: calc(100dvh - 126px);
        padding-inline: 28px;
        background: transparent;
        border: 0;
        border-radius: 0;
    }

    .soft-workbench .history-empty-state p {
        max-width: 290px;
    }
}

/* Generative loading feedback: soft ambient motion without the legacy grid. */
.soft-workbench .loading-overlay {
    isolation: isolate;
    overflow: hidden;
    background: rgba(228, 233, 242, 0.62);
    backdrop-filter: blur(14px) saturate(0.82);
    -webkit-backdrop-filter: blur(14px) saturate(0.82);
}

.soft-workbench .loading-overlay::before {
    z-index: 0;
    inset: -24%;
    opacity: 1;
    background:
        radial-gradient(circle at 36% 44%, rgba(91, 126, 236, 0.2), transparent 24%),
        radial-gradient(circle at 66% 55%, rgba(139, 106, 225, 0.15), transparent 25%),
        radial-gradient(circle at 51% 35%, rgba(86, 198, 224, 0.11), transparent 20%);
    background-size: auto;
    animation: loading-aurora-drift 8s ease-in-out infinite alternate;
}

.soft-workbench .loading-card {
    position: relative;
    z-index: 1;
    width: min(320px, calc(100vw - 36px));
    overflow: hidden;
    padding: 34px 36px 32px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: 28px;
    box-shadow:
        0 28px 72px rgba(32, 45, 72, 0.18),
        0 4px 16px rgba(32, 45, 72, 0.07),
        inset 0 1px 0 #fff;
    backdrop-filter: blur(18px) saturate(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.soft-workbench .loading-card::before {
    position: absolute;
    top: -72px;
    left: 50%;
    width: 190px;
    height: 150px;
    content: '';
    pointer-events: none;
    background: radial-gradient(circle, rgba(83, 121, 229, 0.14), transparent 68%);
    transform: translateX(-50%);
}

.soft-workbench .loading-card::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    content: '';
    background: linear-gradient(90deg, transparent, #6385e8, #9a78df, transparent);
    transform: translateX(-100%);
    animation: loading-card-sweep 2.4s ease-in-out infinite;
}

.soft-workbench .loading-card .loading-spinner {
    width: 66px;
    height: 66px;
    margin: 0 auto 20px;
}

.soft-workbench .loading-card .loading-spinner::before {
    position: absolute;
    inset: 13px;
    content: '';
    background: radial-gradient(circle at 35% 32%, #fff 0 10%, #a9baf4 30%, #708be1 72%);
    border: 6px solid rgba(237, 241, 253, 0.92);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(69, 96, 180, 0.23), 0 0 0 1px rgba(100, 130, 219, 0.08);
    animation: loading-core-breathe 1.8s ease-in-out infinite;
}

.soft-workbench .loading-card .loading-spinner::after {
    display: none;
}

.soft-workbench .loading-card .spinner-track {
    stroke: #e4e9f2;
}

.soft-workbench .loading-card .spinner-progress {
    stroke: #5679dd;
    stroke-width: 3.5;
}

.soft-workbench .loading-card .loading-title {
    position: relative;
    margin: 0;
    color: var(--text-primary);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.35;
}

.soft-workbench .loading-card .loading-hint {
    position: relative;
    margin: 7px 0 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

@keyframes loading-aurora-drift {
    from { transform: translate3d(-2%, -1%, 0) scale(0.96) rotate(-2deg); }
    to { transform: translate3d(2%, 1.5%, 0) scale(1.05) rotate(3deg); }
}

@keyframes loading-core-breathe {
    0%, 100% { transform: scale(0.88); filter: saturate(0.92); }
    50% { transform: scale(1.04); filter: saturate(1.12); }
}

@keyframes loading-card-sweep {
    0% { transform: translateX(-100%); opacity: 0; }
    18%, 78% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .soft-workbench .loading-overlay::before,
    .soft-workbench .loading-card::after,
    .soft-workbench .loading-card .loading-spinner::before {
        animation: none;
    }
}

/* Keep selected batch inputs usable on phones; the desktop six-column task
 * rail otherwise collapses previews into tiny unreadable circles. */
@media (max-width: 700px) {
    .soft-workbench .upload-clear-btn,
    .soft-workbench .batch-close-btn {
        width: 40px;
        height: 40px;
    }

    .soft-workbench .batch-task-list,
    .soft-workbench .batch-task-list.is-sparse {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
        gap: 10px;
        overflow: visible;
    }

    .soft-workbench .batch-task-item,
    .soft-workbench .batch-add-tile {
        width: 100%;
        min-width: 0;
        aspect-ratio: 1 / 1;
        border-radius: 16px;
    }

    .soft-workbench .batch-task-preview {
        border-radius: 15px;
    }

    .soft-workbench .batch-task-copy {
        right: 6px;
        bottom: 6px;
        left: 6px;
        min-height: 42px;
        padding: 7px 8px;
        border-radius: 11px;
    }

    .soft-workbench .batch-task-name {
        font-size: 9px;
    }

    .soft-workbench .batch-task-meta {
        display: block;
        font-size: 8px;
    }

    .soft-workbench .batch-add-tile-icon {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }
}

/* Mobile drawer layering: the dimmer belongs behind the drawer and lets the
 * canvas receive the outside tap that closes it. */
@media (max-width: 900px) {
    .soft-workbench .top-nav {
        z-index: 100;
    }

    body.soft-workbench.sidebar-open .top-nav {
        z-index: 170;
    }

    .soft-workbench .sidebar {
        z-index: 160;
    }

    body.soft-workbench.sidebar-open::after,
    body.soft-workbench::after {
        display: none;
    }

    body.soft-workbench.sidebar-open .sidebar {
        box-shadow:
            0 0 0 100vmax rgba(24, 34, 54, 0.24),
            var(--sys-shadow-panel);
    }
}

@media (prefers-reduced-motion: reduce) {
    .soft-workbench .history-empty-visual i {
        animation: none;
    }
}

/* Final touch overrides must come after the result-card presentation layer. */
@media (hover: none), (pointer: coarse) {
    .soft-workbench .item-actions {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(-50%, 0) scale(1);
    }

    .soft-workbench .upload-slot:not(.has-file) .upload-clear-btn {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .soft-workbench .upload-slot.has-file .upload-clear-btn {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }
}

@media (max-width: 700px) {
    .soft-workbench .batch-remove-btn {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }
}

.soft-workbench .analysis-history-list:has(> .analysis-history-empty-state) {
    align-content: stretch;
}

.soft-workbench .analysis-history-empty-state {
    min-height: 100%;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 8px;
    padding: 28px 22px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 42%, rgba(83, 116, 222, 0.07), transparent 25%),
        #f8f9fc;
    border: 0;
    border-radius: 14px;
}

.soft-workbench .analysis-history-empty-state > span {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 3px;
    color: #5a79d7;
    background: #fff;
    border: 1px solid #dce4f2;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(47, 68, 116, 0.08);
}

.soft-workbench .analysis-history-empty-state strong {
    color: var(--text-primary);
    font-size: 14px;
}

.soft-workbench .analysis-history-empty-state p {
    max-width: 260px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.65;
}

/* Low-height touch landscape needs a genuinely compact composition. At this
 * size the regular desktop rails left useful content below the first fold. */
@media (max-height: 500px) and (orientation: landscape) {
    .soft-workbench .batch-task-list,
    .soft-workbench .batch-task-list.is-sparse {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .soft-workbench .batch-task-name,
    .soft-workbench .batch-add-tile strong {
        font-size: 9px;
    }

    .soft-workbench .batch-remove-btn {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .soft-workbench .history-dialog-header {
        min-height: 66px;
        padding: 9px 18px;
    }

    .soft-workbench .history-dialog-body {
        flex: 1 1 auto;
        max-height: none;
        padding: 12px 24px 16px;
    }

    .soft-workbench .history-summary-card {
        margin-bottom: 10px;
        padding: 9px 12px;
    }

    .soft-workbench .history-empty-state {
        min-height: 128px;
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        place-content: center;
        justify-items: start;
        column-gap: 14px;
        row-gap: 3px;
        padding: 14px 18px;
        text-align: left;
    }

    .soft-workbench .history-empty-visual {
        width: 50px;
        height: 50px;
        grid-column: 1;
        grid-row: 1 / 4;
        margin: 0;
        border-radius: 16px;
    }

    .soft-workbench .history-empty-visual svg {
        width: 24px;
        height: 24px;
    }

    .soft-workbench .history-empty-state strong,
    .soft-workbench .history-empty-state p,
    .soft-workbench .history-empty-tip {
        grid-column: 2;
    }

    .soft-workbench .history-empty-state strong {
        font-size: 14px;
    }

    .soft-workbench .history-empty-state p {
        max-width: none;
        font-size: 10px;
        line-height: 1.45;
    }

    .soft-workbench .history-empty-tip {
        margin-top: 2px;
        padding: 3px 8px;
        font-size: 9px;
    }

    .soft-workbench .analysis-center-topbar,
    .soft-workbench .analysis-topbar-v4 {
        min-height: 0;
        padding: 10px 18px;
    }

    .soft-workbench .analysis-center-brand-copy {
        gap: 2px;
    }

    .soft-workbench .analysis-center-subtitle {
        max-width: calc(100vw - 100px);
        overflow: hidden;
        font-size: 10px;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .soft-workbench .analysis-center-topbar-stack {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 6px;
    }

    .soft-workbench .analysis-center-session-strip,
    .soft-workbench .analysis-center-inline-hints {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .soft-workbench .analysis-session-pill,
    .soft-workbench .analysis-inline-hint {
        min-height: 25px;
        padding: 3px 7px;
        border-radius: 8px;
        font-size: 9px;
        white-space: nowrap;
    }

    .soft-workbench .analysis-inline-label {
        font-size: 8px;
        letter-spacing: 0.08em;
    }

    .soft-workbench .analysis-center-close {
        top: 10px;
        right: 14px;
    }

    .soft-workbench .analysis-center-main,
    .soft-workbench .analysis-main-v4 {
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 14px;
    }

    .soft-workbench .analysis-history-workspace-v4 {
        gap: 9px;
        padding: 12px 14px;
        border-radius: 18px;
    }

    .soft-workbench .analysis-section-heading {
        padding-bottom: 6px;
    }

    .soft-workbench .analysis-section-heading .ai-report-kicker {
        display: none;
    }

    .soft-workbench .analysis-section-heading h4 {
        font-size: 20px;
    }

    .soft-workbench .analysis-history-list,
    .soft-workbench .analysis-history-preview {
        min-height: 128px;
        max-height: none;
    }

    .soft-workbench .analysis-history-empty-state {
        min-height: 100%;
        grid-template-columns: 42px minmax(0, 1fr);
        grid-template-rows: auto auto;
        place-content: center;
        justify-items: start;
        column-gap: 11px;
        row-gap: 2px;
        padding: 12px;
        text-align: left;
    }

    .soft-workbench .analysis-history-empty-state > span {
        width: 40px;
        height: 40px;
        grid-column: 1;
        grid-row: 1 / 3;
        margin: 0;
        border-radius: 13px;
    }

    .soft-workbench .analysis-history-empty-state strong,
    .soft-workbench .analysis-history-empty-state p {
        grid-column: 2;
    }

    .soft-workbench .analysis-history-empty-state p {
        max-width: none;
        font-size: 9px;
        line-height: 1.4;
    }
}

/* =========================================================
 * Motion refinement layer
 * Keep movement short and spatially consistent: content enters from 4–6px,
 * exits over a slightly faster curve, and never competes with task feedback.
 * ========================================================= */

.soft-workbench .history-dialog {
    animation: none;
    transition:
        opacity var(--sys-motion-exit),
        transform var(--sys-motion-exit);
}

.soft-workbench .modal-backdrop:not(.active) .history-dialog {
    opacity: 0;
    transform: translateY(4px) scale(0.995);
}

.soft-workbench .batch-overlay:not(.active),
.soft-workbench .modal-backdrop:not(.active),
.soft-workbench .refine-overlay:not(.active) {
    pointer-events: none;
}

.soft-workbench .modal-backdrop.active .history-dialog {
    opacity: 1;
    transform: none;
}

.soft-workbench .refine-overlay.active .refine-editor-layout {
    animation: none;
}

.soft-workbench .batch-reset-confirm:not(.active) {
    pointer-events: none;
}

.soft-workbench .batch-reset-confirm-card {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
    transition:
        opacity 160ms var(--sys-ease-standard),
        transform 200ms var(--sys-ease-out);
}

.soft-workbench .batch-reset-confirm.active .batch-reset-confirm-card {
    opacity: 1;
    transform: none;
}

.soft-workbench .toast-notification {
    opacity: 0;
    animation: none;
    transform: translateX(-50%) translateY(10px) scale(0.985);
    transition:
        opacity 180ms var(--sys-ease-standard),
        transform 220ms var(--sys-ease-out);
    will-change: opacity, transform;
}

.soft-workbench .toast-notification.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.soft-workbench .toast-notification.toast-hiding {
    opacity: 0;
    transform: translateX(-50%) translateY(6px) scale(0.99);
    transition:
        opacity 160ms var(--sys-ease-in),
        transform 180ms var(--sys-ease-in);
}

.soft-workbench .analysis-mode-tab {
    transition:
        color var(--sys-motion-fast),
        background-color var(--sys-motion-fast),
        border-color var(--sys-motion-fast),
        box-shadow var(--sys-motion-fast),
        transform var(--sys-motion-fast);
}

.soft-workbench .analysis-mode-tab:active,
.soft-workbench .history-version-btn:active:not(:disabled),
.soft-workbench .history-restore-btn:active:not(:disabled) {
    transform: scale(0.975);
}

.soft-workbench .generate-btn:active:not(:disabled),
.soft-workbench .batch-primary-btn:active:not(:disabled),
.soft-workbench .batch-download-btn:active:not(:disabled),
.soft-workbench .refine-send-btn:active:not(:disabled),
.soft-workbench .analysis-center-followup-send:active:not(:disabled) {
    transform: translateY(0) scale(0.985);
    filter: saturate(0.96);
}

.soft-workbench .generate-btn svg,
.soft-workbench .batch-primary-btn svg,
.soft-workbench .batch-download-btn svg,
.soft-workbench .refine-send-btn svg,
.soft-workbench .analysis-center-followup-send svg {
    transition: transform var(--sys-motion-fast);
}

.soft-workbench .generate-btn:hover:not(:disabled) svg,
.soft-workbench .batch-primary-btn:hover:not(:disabled) svg,
.soft-workbench .batch-download-btn:hover:not(:disabled) svg,
.soft-workbench .refine-send-btn:hover:not(:disabled) svg,
.soft-workbench .analysis-center-followup-send:hover:not(:disabled) svg {
    transform: translateY(-1px) scale(1.055);
}

.soft-workbench .upload-slot.has-file .slot-preview {
    animation: upload-preview-settle 220ms var(--sys-ease-out) both;
}

@keyframes upload-preview-settle {
    from { opacity: 0; transform: scale(1.018); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 600px) {
    .soft-workbench .toast-notification.toast-hiding {
        transform: translateX(-50%) translateY(-6px) scale(0.99);
    }
}

@media (prefers-reduced-motion: reduce) {
    .soft-workbench .upload-slot.has-file .slot-preview {
        animation: none;
    }
}

/* V16 CTR context: optional inputs stay compact and visually secondary. */
.soft-workbench .analysis-brief-v16 {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 15px 16px;
    border: 1px solid rgba(109, 93, 252, 0.18);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.055), rgba(255, 255, 255, 0.84) 52%, rgba(33, 183, 164, 0.035));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.soft-workbench .analysis-brief-v16-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.soft-workbench .analysis-brief-v16-head > div {
    display: grid;
    gap: 2px;
}

.soft-workbench .analysis-brief-v16-head span,
.soft-workbench .analysis-brief-v16-grid label > span {
    color: #778197;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}

.soft-workbench .analysis-brief-v16-head strong {
    color: #20283a;
    font-size: 14px;
}

.soft-workbench .analysis-brief-v16-head small {
    max-width: 520px;
    color: #7b8497;
    font-size: 11px;
    line-height: 1.55;
    text-align: right;
}

.soft-workbench .analysis-brief-v16-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.soft-workbench .analysis-brief-v16-grid label {
    display: grid;
    gap: 6px;
}

.soft-workbench .analysis-brief-v16-grid label.is-wide {
    grid-column: 1 / -1;
}

.soft-workbench .analysis-brief-v16-grid input {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #dde2eb;
    border-radius: 11px;
    outline: 0;
    background: rgba(255, 255, 255, 0.88);
    color: #232a3a;
    font: inherit;
    font-size: 12px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.soft-workbench .analysis-brief-v16-grid input:focus {
    border-color: rgba(109, 93, 252, 0.55);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(109, 93, 252, 0.1);
}

.soft-workbench .analysis-brief-v16-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: #626c80;
    font-size: 11px;
    line-height: 1.45;
    cursor: pointer;
}

.soft-workbench .analysis-brief-v16-check input {
    accent-color: var(--sys-color-primary, #6d5dfc);
}

.soft-workbench .analysis-auto-context-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.soft-workbench .analysis-auto-context-flow > span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 11px;
    border: 1px solid rgba(109, 93, 252, .12);
    border-radius: 12px;
    background: rgba(255, 255, 255, .74);
    color: #4f596d;
    font-size: 11px;
}

.soft-workbench .analysis-auto-context-flow i {
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(109, 93, 252, .1);
    color: #5c4de0;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
}

.soft-workbench .analysis-auto-context-flow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.soft-workbench .analysis-platform-fixed-note {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid rgba(32, 139, 104, .14);
    border-radius: 12px;
    background: rgba(236, 250, 245, .72);
    color: #4f625d;
    font-size: 11px;
    line-height: 1.5;
}

.soft-workbench .analysis-platform-fixed-note b { flex: 0 0 auto; color: #13795b; }

.soft-workbench .analysis-context-optional {
    overflow: hidden;
    border: 1px solid rgba(109, 93, 252, .12);
    border-radius: 13px;
    background: rgba(255, 255, 255, .62);
}

.soft-workbench .analysis-context-optional > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    color: #586276;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.soft-workbench .analysis-context-optional > summary::-webkit-details-marker { display: none; }
.soft-workbench .analysis-context-optional > summary small { color: #8a93a3; font-size: 10px; font-weight: 500; }
.soft-workbench .analysis-context-optional[open] { padding-bottom: 11px; }
.soft-workbench .analysis-context-optional[open] > summary { margin-bottom: 10px; border-bottom: 1px solid rgba(109, 93, 252, .1); }
.soft-workbench .analysis-context-optional > .analysis-brief-v16-grid,
.soft-workbench .analysis-context-optional > .analysis-brief-v16-check { margin-inline: 11px; }

@media (max-width: 720px) {
    .soft-workbench .analysis-brief-v16-head {
        align-items: start;
        flex-direction: column;
        gap: 5px;
    }

    .soft-workbench .analysis-brief-v16-head small { text-align: left; }
    .soft-workbench .analysis-brief-v16-grid { grid-template-columns: 1fr; }
    .soft-workbench .analysis-brief-v16-grid label.is-wide { grid-column: auto; }
    .soft-workbench .analysis-auto-context-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .soft-workbench .analysis-platform-fixed-note { align-items: flex-start; flex-direction: column; gap: 2px; }
    .soft-workbench .analysis-context-optional > summary { align-items: flex-start; flex-direction: column; gap: 2px; }
    .soft-workbench .analysis-center-inline-hints { display: none; }
    .soft-workbench .analysis-center-session-strip {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .soft-workbench .analysis-center-session-strip::-webkit-scrollbar { display: none; }
}

.soft-workbench .analysis-v16-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    margin-top: 18px;
}

.soft-workbench .analysis-v16-flow > article {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid rgba(60, 77, 111, .1);
    border-radius: 14px;
    background: rgba(255, 255, 255, .78);
}

.soft-workbench .analysis-v16-flow > article > span {
    color: #7d8799;
    font-size: 10px;
    font-weight: 700;
}

.soft-workbench .analysis-v16-flow > article > strong {
    color: #263044;
    font-size: 15px;
}

.soft-workbench .analysis-v16-flow > article > small {
    overflow: hidden;
    color: #68748a;
    font-size: 10px;
    line-height: 1.45;
    text-overflow: ellipsis;
}

.soft-workbench .analysis-report-compact.is-v17 .analysis-v16-flow > article { padding: 13px 14px; }
.soft-workbench .analysis-report-compact.is-v17 .analysis-v16-flow > article > span { font-size: 12px; }
.soft-workbench .analysis-report-compact.is-v17 .analysis-v16-flow > article > strong { font-size: 16px; }
.soft-workbench .analysis-report-compact.is-v17 .analysis-v16-flow > article > small { font-size: 13px; line-height: 1.5; }

.soft-workbench .analysis-v16-flow > i {
    align-self: center;
    color: #a0a9b8;
    font-size: 13px;
    font-style: normal;
}

.soft-workbench .analysis-v16-action-focus {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border: 1px solid #e5e8ef;
    border-radius: 18px;
    background: #fff;
}

.soft-workbench .analysis-v16-action-focus article {
    display: grid;
    gap: 5px;
    padding: 13px 14px;
    border-radius: 13px;
    background: #f7f8fb;
}

.soft-workbench .analysis-v16-action-focus article.is-move {
    background: linear-gradient(135deg, rgba(109, 93, 252, .09), rgba(109, 93, 252, .035));
}

.soft-workbench .analysis-v16-action-focus span,
.soft-workbench .analysis-v16-banner-line > span {
    color: #7c8596;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .04em;
}

.soft-workbench .analysis-v16-action-focus strong,
.soft-workbench .analysis-v16-banner-line strong {
    color: #242b3a;
    font-size: 13px;
    line-height: 1.55;
}

.soft-workbench .analysis-v16-action-focus > p {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0 4px;
    color: #777f90;
    font-size: 10px;
}

.soft-workbench .analysis-v16-banner-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px 14px;
    padding: 12px 16px;
    border: 1px solid rgba(22, 163, 126, .16);
    border-radius: 15px;
    background: rgba(22, 163, 126, .045);
}

.soft-workbench .analysis-v16-banner-line small {
    grid-column: 2;
    color: #718078;
    font-size: 10px;
    line-height: 1.45;
}

.soft-workbench .analysis-v16-candidates {
    overflow: hidden;
    border: 1px solid #e3e7ee;
    border-radius: 18px;
    background: #fff;
}

.soft-workbench .analysis-v16-candidates > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 17px;
    color: #293142;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
}

.soft-workbench .analysis-v16-candidates > summary::-webkit-details-marker { display: none; }
.soft-workbench .analysis-v16-candidates > summary small { color: #8991a0; font-size: 10px; font-weight: 500; }
.soft-workbench .analysis-v16-candidates[open] > summary { border-bottom: 1px solid #e7eaf0; }
.soft-workbench .analysis-v16-candidates > .analysis-compact-candidate-grid { padding: 14px; }

.soft-workbench .analysis-v16-ledger,
.soft-workbench .analysis-v16-validation {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.soft-workbench .analysis-v16-ledger b,
.soft-workbench .analysis-v16-validation b { color: #30384a; font-size: 11px; }
.soft-workbench .analysis-v16-ledger span,
.soft-workbench .analysis-v16-validation span { color: #6e778a; font-size: 10px; line-height: 1.5; }

@media (max-width: 720px) {
    .soft-workbench .analysis-v16-flow { grid-template-columns: 1fr; }
    .soft-workbench .analysis-v16-flow > i { display: none; }
    .soft-workbench .analysis-report-compact.is-v17 .analysis-v16-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .soft-workbench .analysis-report-compact.is-v17 .analysis-v16-flow > article { gap: 3px; padding: 10px 9px; }
    .soft-workbench .analysis-report-compact.is-v17 .analysis-v16-flow > article > span { font-size: 10px; }
    .soft-workbench .analysis-report-compact.is-v17 .analysis-v16-flow > article > strong { font-size: 14px; }
    .soft-workbench .analysis-report-compact.is-v17 .analysis-v16-flow > article > small { display: none; }
    .soft-workbench .analysis-v16-action-focus { grid-template-columns: 1fr; }
    .soft-workbench .analysis-v16-action-focus > p { grid-column: auto; }
    .soft-workbench .analysis-v16-banner-line { grid-template-columns: 1fr; }
    .soft-workbench .analysis-v16-banner-line small { grid-column: auto; }
}
