  /* ========== 基础 ========== */
  html { font-size: 26.6667vw; }
  @media (min-width: 450px) { html { font-size: 120px; } }
  @media (min-width: 768px) { html { font-size: 16px; } }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html, body {
    height: 100%;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  }

  body {
    background: #fff;
    background-size: cover;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  body.has-bg {
    background: #fff;
  }
  @media (max-width: 767px) {
    body.has-bg {
      background: #fff;
    }
  }

  /* ========== 布局 ========== */
  #app { display: flex; height: 100dvh; position: relative; }

  /* 桌面工作台元素默认隐藏，避免影响移动端现有结构。 */
  #desktop-topbar,
  .brand-lockup,
  .desktop-empty-state { display: none; }

  /* === 侧边栏 === */
  #sidebar {
    --sidebar-footer-height: 62px;
    --sidebar-history-entry-height: 56px;
    --history-popover-gap: 8px;
    --history-popover-top-reserve: 64px;
    position: relative;
    width: 260px;
    min-width: 260px;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
    z-index: 20;
    overflow-x: hidden;
    overflow-y: hidden;
    transition: transform 0.25s ease;
  }
  #sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  #sidebar-header h2 { font-size: 15px; color: #333; font-weight: 600; }
  .header-actions { display: flex; align-items: center; gap: 6px; }
  #btn-new-session {
    width: 32px; height: 32px;
    border: none; border-radius: 8px;
    background: #f08519; color: #fff;
    font-size: 20px; line-height: 32px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  #btn-new-session:hover { background: #d4700e; }
  #btn-new-session:active { background: #b85e0a; }
  .sidebar-tool-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 0; height: 38px; padding: 0 10px;
    border: 1px solid #e5e7eb; border-radius: 9px;
    background: #fff; color: #586273; font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: color .16s ease, border-color .16s ease, background .16s ease;
  }
  .sidebar-tool-button svg, .history-popover-title svg, .session-icon { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .sidebar-tool-button:hover, .sidebar-tool-button.is-active { border-color: #f5c68a; background: #fff7ed; color: #d4700e; }
  .sidebar-logout-button { flex: 0 0 38px; width: 38px; padding: 0; }
  .sidebar-logout-button:hover { background: #fee2e2; border-color: #fecaca; color: #dc2626; }
  .sidebar-wallet-button { flex: 1 1 auto; }
  .wallet-balance { display: none; }
  .sidebar-wallet-button.is-revealed { border-color: #f5c68a; background: #fff7ed; color: #d4700e; }
  .sidebar-wallet-button.is-revealed .wallet-balance { display: inline; }
  .pk-entry {
    height: 32px; padding: 0 10px;
    border: 1px solid #f5c68a; border-radius: 8px;
    background: #fff7ed; color: #d4700e; font-size: 13px;
    text-decoration: none;
    display: inline-flex; align-items: center;
  }
  .pk-entry:hover { background: #fde8d0; }

  #history-popover {
    position: absolute; right: 12px; bottom: calc(var(--sidebar-footer-height) + var(--sidebar-history-entry-height) + var(--history-popover-gap)); left: 12px; z-index: 30;
    display: flex; flex-direction: column; max-height: min(390px, calc(100% - var(--sidebar-footer-height) - var(--sidebar-history-entry-height) - var(--history-popover-gap) - var(--history-popover-top-reserve)));
    padding: 12px; border: 1px solid #e2e7ee; border-radius: 14px 14px 10px 10px;
    background: #fff; box-shadow: 0 16px 38px rgba(31, 41, 55, .16);
  }
  #history-popover.hidden { display: none; }
  .history-popover-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 2px 11px; border-bottom: 1px solid #e8ecf2; }
  .history-popover-title { display: inline-flex; align-items: center; gap: 7px; color: #283344; font-size: 14px; font-weight: 700; }
  .history-popover-title svg { width: 19px; height: 19px; color: #d4700e; }
  .history-popover-close { width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: #667085; font-size: 22px; line-height: 1; cursor: pointer; }
  .history-popover-close:hover { background: #f2f4f7; color: #344054; }
  .history-model-context { display: flex; align-items: center; gap: 8px; padding: 11px 2px 8px; color: #8b919c; font-size: 12px; }
  .history-model-context strong { max-width: 150px; overflow: hidden; padding: 4px 8px; border: 1px solid #f5c68a; border-radius: 999px; color: #d4700e; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
  #session-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin-top: 0;
    padding: 2px 0 0;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar-section-title {
    padding: 0 8px 8px;
    color: #8b919c;
    font-size: 12px;
    font-weight: 600;
  }
  #session-list::-webkit-scrollbar { width: 4px; }
  #session-list::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 2px; }

  /* === 功能模块导航 === */
  #function-navigation {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 8px 12px 0;
    padding: 0;
    overflow-y: auto;
  }
  #function-navigation::-webkit-scrollbar { width: 4px; }
  #function-navigation::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 2px; }
  #recent-history-entry-wrap { flex: 0 0 var(--sidebar-history-entry-height); height: var(--sidebar-history-entry-height); padding: 8px 12px 10px; }
  .recent-history-entry {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 38px; padding: 0 10px;
    border: 1px solid #e5e7eb; border-radius: 9px; color: #586273; background: #fff; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
    transition: color .16s ease, border-color .16s ease, background .16s ease;
  }
  .recent-history-entry-label { display: inline-flex; align-items: center; min-width: 0; gap: 7px; }
  .recent-history-entry svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .recent-history-entry-arrow { color: #98a2b3; font-size: 20px; font-weight: 300; line-height: 1; }
  .recent-history-entry:hover, .recent-history-entry.is-active { border-color: #f5c68a; background: #fff7ed; color: #d4700e; }
  #sidebar-footer { display: flex; flex: 0 0 auto; gap: 7px; padding: 12px; border-top: 1px solid #e5e7eb; }
  .sidebar-profile-button { flex: 1 1 auto; }
  .module-navigation { display: grid; gap: 3px; padding: 3px 0 5px; }
  .nav-module { overflow: hidden; border-radius: 8px; }
  .nav-module-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: #7b8491;
    cursor: pointer;
    min-height: 36px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: left;
  }
  .nav-module-toggle:hover { background: #f3f4f6; color: #4d5562; }
  .nav-dot { display: inline-block; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
  .nav-module-dot { width: 5px; height: 5px; margin: 0 11px 0 3px; opacity: 0.75; }
  .nav-module-name { flex: 1; }
  .nav-module-items {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .22s cubic-bezier(.2, .8, .2, 1);
  }
  .nav-module.expanded .nav-module-items { grid-template-rows: 1fr; }
  .nav-module-items-content {
    min-height: 0;
    overflow: hidden;
    padding: 2px 0 4px;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity .16s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
  }
  .nav-module.expanded .nav-module-items-content { opacity: 1; transform: translateY(0); }
  .nav-feature-item {
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
    min-height: 36px;
    padding: 8px 10px 8px 30px;
    border-radius: 7px;
    border: 0;
    background: transparent;
    color: #344054;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.005em;
    line-height: 1.3;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
  }
  .nav-feature-dot { width: 4px; height: 4px; margin-right: 12px; color: #98a2b3; }
  .nav-feature-name { overflow: hidden; text-overflow: ellipsis; }
  .nav-feature-item:hover { background: #f3f4f6; color: #333; }
  .nav-feature-item.active { background: #fff0df; box-shadow: inset 3px 0 0 var(--orange, #f08519); color: #c45d00; font-weight: 650; }
  .nav-feature-item.active .nav-feature-dot { color: #dd7007; }
  .nav-module-empty { padding: 7px 10px 8px 34px; color: #98a2b3; font-size: 12px; }

  .session-item {
    display: flex; align-items: center;
    min-height: 40px; padding: 8px; border-radius: 8px;
    cursor: pointer; margin-bottom: 2px;
    transition: background 0.15s;
    gap: 8px;
  }
  .session-item:hover { background: #f3f4f6; }
  .session-item.active { position: relative; background: #fde8d0; }
  .session-item.active::before { position: absolute; top: 8px; bottom: 8px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange, #f08519); content: ""; }
  .session-item .title {
    flex: 1; font-size: 13px; color: #333;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    min-width: 0;
  }
  .session-icon { width: 16px; height: 16px; color: #6b7788; cursor: pointer; }
  .session-time { flex: 0 0 auto; color: #98a2b3; font-size: 11px; white-space: nowrap; cursor: pointer; }
  .session-item .del {
    width: 24px; height: 24px;
    border: none; border-radius: 4px;
    background: transparent; color: #999;
    font-size: 16px; cursor: pointer;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .session-item .del:hover { background: #fee2e2; color: #dc2626; }
  .history-empty { padding: 20px 6px; color: #98a2b3; font-size: 13px; text-align: center; }

  /* === 主区域 === */
  #main {
    flex: 1; display: flex; flex-direction: column;
    height: 100%; min-width: 0;
    padding: env(safe-area-inset-top, 12px) 16px calc(12px + env(safe-area-inset-bottom, 16px));
    gap: 12px;
  }

  /* === 移动端菜单按钮 === */
  #btn-menu {
    display: none;
    position: absolute; top: 12px; left: 12px; z-index: 30;
    width: 36px; height: 36px;
    border: none; border-radius: 8px;
    background: rgba(255,255,255,0.9);
    font-size: 20px; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  /* === 侧边栏遮罩 (移动端) === */
  #sidebar-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 19;
    background: rgba(0,0,0,0.4);
  }

  /* === 结果区 === */
  #results {
    flex: 1; overflow-y: auto;
    max-width: 640px; width: 100%; margin: 0 auto;
    padding: 12px 16px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    -webkit-overflow-scrolling: touch;
  }
  #results::-webkit-scrollbar { width: 0; }

  .hint {
    color: rgba(255,255,255,0.7); text-align: center;
    padding-top: 60px; font-size: 14px;
  }

  /* === 对话轮次 === */
  .q-round { margin-bottom: 16px; animation: rise .25s ease; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

  .q-card {
    display: flex; justify-content: flex-end;
    align-items: flex-start; gap: 6px;
    margin-bottom: 6px;
  }
  .q-card .bubble {
    max-width: 80%;
    background: rgba(253, 232, 208, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(245, 198, 138, 0.5);
    border-radius: 10px;
    padding: 10px 14px; font-size: 14px;
    color: #4a2e0a; min-width: 0; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap;
  }

  .answer-card {
    background: rgba(238, 244, 251, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(200, 217, 240, 0.5);
    border-radius: 10px; padding: 14px; margin-bottom: 12px;
    animation: rise .25s ease;
  }
  .answer-card .label {
    display: flex; align-items: center;
    justify-content: space-between; gap: 8px;
    font-size: 12px; color: #4a7fb5;
    font-weight: 700; margin-bottom: 6px;
  }
  .answer-card .text {
    font-size: 14px; line-height: 1.7; color: #333;
    min-width: 0; overflow-wrap: anywhere; word-break: break-word;
  }
  .answer-card .text h1,
  .answer-card .text h2,
  .answer-card .text h3 { margin: 8px 0 4px; line-height: 1.4; }
  .answer-card .text h1 { font-size: 18px; }
  .answer-card .text h2 { font-size: 16px; }
  .answer-card .text h3 { font-size: 15px; }
  .answer-card .text ul,
  .answer-card .text ol { padding-left: 1.4em; margin: 4px 0; }
  .answer-card .text li { margin-bottom: 2px; }
  .answer-card .text blockquote {
    margin: 6px 0; padding: 6px 12px;
    border-left: 3px solid #c8d9f0;
    background: rgba(200, 217, 240, 0.25);
    color: #4a5568;
  }
  .answer-card .text code {
    background: rgba(0,0,0,0.06); padding: 2px 6px; border-radius: 4px;
    font-family: "SF Mono", "Consolas", monospace; font-size: 13px;
  }
  .answer-card .text pre {
    background: rgba(0,0,0,0.05); border-radius: 8px;
    padding: 10px 14px; margin: 6px 0;
    overflow-x: auto; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap;
  }
  .answer-card .text pre code { background: none; padding: 0; }
  .answer-card .text hr {
    border: none; border-top: 1px solid rgba(0,0,0,0.1);
    margin: 10px 0;
  }
  .answer-card .text a { color: #4a7fb5; }
  .answer-card .text .img-wrap {
    position: relative; display: block;
    width: max-content; max-width: 50%;
    margin: 8px 0;
  }
  .answer-card .text .img-wrap img {
    display: block; width: 100%; max-height: 320px;
    border-radius: 8px; cursor: zoom-in;
  }
  .answer-card .text .img-dl {
    position: absolute; top: 6px; right: 6px;
    width: 26px; height: 26px; padding: 0;
    border: none; border-radius: 6px;
    background: rgba(0,0,0,0.45); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0; transition: opacity .15s ease, background .15s ease;
  }
  .answer-card .text .img-wrap:hover .img-dl { opacity: 1; }
  .answer-card .text .img-dl:hover { background: rgba(0,0,0,0.65); }
  @media (hover: none) {
    .answer-card .text .img-dl { opacity: 0.75; }
  }
  @media (max-width: 640px) {
    .answer-card .text .img-wrap { max-width: 75%; }
    .answer-card .text .img-wrap img { max-height: 240px; }
  }
  /* === 图片灯箱 === */
  .lightbox {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.82);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s ease;
    cursor: zoom-out;
    pointer-events: none;  /* 关闭状态不拦截页面点击 */
  }
  .lightbox.show { opacity: 1; pointer-events: auto; }
  .lightbox img,
  .lightbox video {
    max-width: 92vw; max-height: 92vh;
    border-radius: 6px; cursor: default;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  }
  .lightbox video { display: none; width: min(92vw, 1120px); background: #000; }
  .lightbox.is-video img { display: none; }
  .lightbox.is-video video { display: block; }
  .lightbox .lb-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border: none; border-radius: 50%;
    background: rgba(255,255,255,0.15); color: #fff;
    font-size: 18px; line-height: 1; cursor: pointer;
  }
  .generated-media-previewable { outline: 0; }
  img.generated-media-previewable { cursor: zoom-in; }
  img.generated-media-previewable:hover { filter: brightness(.97); }
  img.generated-media-previewable:focus-visible { outline: 3px solid rgba(52,120,246,.72); outline-offset: 3px; }
  /* === 复制按钮 === */
  .copy-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; padding: 0;
    border: none; border-radius: 6px;
    background: rgba(255,255,255,0.65); color: #8aa0b8;
    cursor: pointer; flex-shrink: 0;
    opacity: 0; transition: opacity .15s ease, background .15s ease, color .15s ease;
  }
  .q-round:hover .copy-btn { opacity: 1; }
  .copy-btn:hover { background: rgba(74,127,181,0.15); color: #4a7fb5; }
  .copy-btn.copied { opacity: 1; color: #3aa76d; }
  .copy-btn:focus-visible { opacity: 1; outline: 2px solid rgba(74,127,181,0.5); }
  @media (hover: none) {
    .copy-btn { opacity: 0.55; }
    .copy-btn.copied { opacity: 1; }
  }
  /* === 顶部 toast === */
  .toast {
    position: fixed; top: 16px; left: 50%;
    transform: translate(-50%, -8px);
    background: rgba(0,0,0,0.72); color: #fff;
    font-size: 13px; line-height: 1.5;
    padding: 7px 18px; border-radius: 20px;
    opacity: 0; pointer-events: none; z-index: 999;
    transition: opacity .25s ease, transform .25s ease;
  }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }

  /* === 余额条 === */
  .wallet-bar {
    padding: 9px 16px;
    font-size: 13px;
    color: #4a2e0a;
    background: rgba(253, 232, 208, 0.85);
    border-bottom: 1px solid rgba(240, 213, 174, 0.8);
  }

  /* === 余额不足弹窗 === */
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
  }
  .balance-modal {
    position: relative;
    background: #fff; border-radius: 14px; padding: 28px 32px;
    max-width: 300px; width: 90%; text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  }
  .balance-modal h3 { font-size: 17px; margin-bottom: 12px; color: #333; }
  .balance-modal p { font-size: 14px; color: #666; margin-bottom: 20px; line-height: 1.6; }
  .balance-modal .balance-modal-close {
    position: absolute; top: 8px; right: 12px;
    border: none; background: transparent; color: #999;
    font-size: 20px; line-height: 1; cursor: pointer; padding: 4px;
  }
  .balance-modal .balance-modal-close:hover { color: #333; }
  .balance-modal .balance-modal-confirm {
    border: none; border-radius: 20px; padding: 9px 28px;
    background: #f08519; color: #fff; font-size: 14px; cursor: pointer;
  }
  .profile-onboarding-dialog {
    width: min(430px, calc(100vw - 32px)); padding: 30px; border-radius: 16px; color: #344054; background: #fff; box-shadow: 0 18px 48px rgba(31, 41, 55, .18); text-align: left;
  }
  .profile-onboarding-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 16px; border-radius: 12px; color: #d4700e; background: #fff1df; font-size: 20px; }
  .profile-onboarding-dialog h2 { margin: 0 0 12px; color: #1f2937; font-size: 21px; }
  .profile-onboarding-dialog p { margin: 0 0 11px; color: #667085; font-size: 14px; line-height: 1.7; }
  .profile-onboarding-dialog p:last-child { margin-bottom: 0; }
  .profile-onboarding-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
  .profile-onboarding-actions button { min-height: 40px; padding: 0 15px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 650; }
  .profile-onboarding-later { border: 1px solid #d9dfe8; color: #586273; background: #fff; }
  .profile-onboarding-later:hover { border-color: #b9c2ce; background: #f8fafc; }
  .profile-onboarding-open { border: 1px solid #f08519; color: #fff; background: #f08519; }
  .profile-onboarding-open:hover { background: #d4700e; }
  .hidden { display: none !important; }
  .answer-card .text .table-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin: 8px 0;
  }
  .answer-card .text table {
    border-collapse: collapse;
    font-size: 13px; min-width: 100%;
  }
  .answer-card .text th,
  .answer-card .text td {
    border: 1px solid rgba(0,0,0,0.1);
    padding: 6px 10px; text-align: left;
    white-space: nowrap;
  }
  .answer-card .text th {
    background: rgba(0,0,0,0.04); font-weight: 600;
  }

  /* 所有模型共用的对话内容宽度约束：长链接、无空格英文、连续字符与 Markdown 结构都不能撑破消息区域。 */
  #results .q-round,
  #results .q-card,
  #results .q-message-stack,
  #results .q-card .bubble,
  #results .answer-card,
  #results .answer-card .text { min-width: 0; max-width: 100%; }
  #results .q-card .bubble,
  #results .answer-card .text,
  #results .answer-card .text :is(p, li, blockquote, h1, h2, h3, h4, h5, h6, a, strong, em, del, code) {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  #results .answer-card .text .table-wrap { width: 100%; max-width: 100%; overflow-x: hidden; }
  #results .answer-card .text table { width: 100%; min-width: 0; table-layout: fixed; }
  #results .answer-card .text th,
  #results .answer-card .text td { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
  #results .answer-card .text pre { max-width: 100%; overflow-x: hidden; overflow-wrap: anywhere; word-break: break-all; white-space: pre-wrap; }
  #results .answer-card .text img,
  #results .answer-card .text video,
  #results .answer-card .text iframe { max-width: 100%; height: auto; }
  .stream-text.streaming::after {
    content: "▊"; animation: blink 0.8s step-end infinite; color: #4a7fb5;
  }
  @keyframes blink { 50% { opacity: 0; } }

  .error { background: #fff0f0; color: #b02a2a; }

  /* === 输入框 === */
  #form {
    display: flex; gap: 8px;
    max-width: 640px; width: 100%; margin: 0 auto;
    flex-shrink: 0;
  }
  #form #input {
    flex: 1; min-width: 0; min-height: 44px; max-height: 168px; resize: none; outline: none;
    overflow-x: hidden; overflow-y: hidden; border: 1px solid rgba(255,255,255,0.35);
    border-radius: 22px; padding: 11px 16px;
    font: inherit; font-size: 15px; line-height: 1.5;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #333;
    -webkit-user-select: text; user-select: text;
  }
  #form #input:focus {
    border-color: #4a7fb5;
    box-shadow: 0 0 0 2px rgba(74,127,181,.25);
  }
  #form button {
    border: none; border-radius: 22px;
    padding: 0 24px; font-size: 15px;
    background: #f08519; color: #fff; cursor: pointer;
    flex-shrink: 0; min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }
  #form button:active { background: #cc6d0f; }
  #form button:disabled { opacity: .6; }

  /* === 加载动画 === */
  .loading-dots { display: inline-flex; gap: 4px; align-items: center; }
  .loading-dots span {
    width: 6px; height: 6px;
    background: #4a7fb5; border-radius: 50%;
    animation: bounce 0.6s infinite alternate;
  }
  .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
  .loading-dots span:nth-child(3) { animation-delay: 0.4s; }
  .chat-loading-inline { display: inline-flex; align-items: center; gap: 8px; color: #6d7a91; font-size: 14px; }
  .chat-loading-inline i { width: 14px; height: 14px; border: 2px solid #d4e2f8; border-top-color: #4a7fb5; border-radius: 50%; animation: ai-spin .8s linear infinite; }
  @keyframes bounce {
    from { transform: translateY(0); opacity: 0.4; }
    to   { transform: translateY(-8px); opacity: 1; }
  }
  /* 统一的局部 AI 请求反馈：仅表示请求进行中，不宣称真实生成百分比。 */
  .ai-loading { display: flex; align-items: center; gap: 12px; max-width: 420px; padding: 14px 16px; border: 1px solid #dce7f7; border-radius: 12px; color: #475467; background: #fff; box-shadow: 0 6px 18px rgba(28, 55, 90, .07); }
  .ai-loading-compact { max-width: none; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; box-shadow: none; background: #f8fbff; }
  .ai-loading-spinner, .ai-button-spinner { flex: 0 0 auto; width: 20px; height: 20px; border: 2px solid #d6e5ff; border-top-color: #3478f6; border-radius: 50%; animation: ai-spin .8s linear infinite; }
  .ai-loading-copy { display: grid; flex: 1; min-width: 0; gap: 4px; }
  .ai-loading-copy strong { color: #1d2939; font-size: 14px; line-height: 1.25; }
  .ai-loading-status { overflow: hidden; color: #71809a; font-size: 12px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
  .ai-loading-progress { display: block; height: 3px; overflow: hidden; border-radius: 99px; background: #e7eef9; }
  .ai-loading-progress i { display: block; width: 42%; height: 100%; border-radius: inherit; background: #3478f6; animation: ai-progress-pulse 1.5s ease-in-out infinite; }
  .ai-loading.is-complete .ai-loading-progress i { width: 100%; animation: none; transition: width .2s ease; }
  .ai-loading.is-failed { border-color: #f2c7c3; background: #fff7f6; }.ai-loading.is-failed .ai-loading-spinner { border-color: #f5d2cf; border-top-color: #d92d20; animation: none; }
  .ai-button-loading { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; cursor: wait !important; }.ai-button-spinner { width: 15px; height: 15px; border-color: rgba(255,255,255,.45); border-top-color: #fff; }
  @keyframes ai-spin { to { transform: rotate(360deg); } }
  @keyframes ai-progress-pulse { 0% { transform: translateX(-110%); } 55% { transform: translateX(145%); } 100% { transform: translateX(145%); } }
  /* 加载状态需要持续传达“仍在处理”，按钮、海报等复用的 spinner 不因系统动画偏好而静止。 */
  @media (prefers-reduced-motion: reduce) { .ai-loading-progress i, .result-skeleton { animation: none !important; } .ai-loading-progress i { width: 75%; } }

  /* ========== 移动端 ========== */
  @media (max-width: 767px) {
    #sidebar {
      position: fixed; left: 0; top: 0;
      transform: translateX(-100%);
      box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    }
    #sidebar.open { transform: translateX(0); }

    #sidebar-overlay.open { display: block; }

    #btn-menu { display: flex; align-items: center; justify-content: center; }

    #main { padding-top: 52px; }

    #results { border-radius: 10px; padding: 10px 12px; }
  }

  /* ========== 桌面端工作台（不覆盖移动端） ========== */
  @media (min-width: 768px) {
    :root {
      --canvas: #fff;
      --surface: #ffffff;
      --surface-muted: #fbfbfc;
      --ink: #20242c;
      --muted: #707784;
      --line: #e6e8ec;
      --orange: #f28a22;
      --orange-deep: #d96f0b;
      --orange-soft: #fff3e7;
    }

    body,
    body.has-bg {
      background: var(--canvas);
      color: var(--ink);
    }

    #app { background: var(--canvas); }

    #sidebar {
      width: 272px;
      min-width: 272px;
      background: var(--surface);
      border-right-color: var(--line);
      box-shadow: 1px 0 0 rgba(31, 35, 42, 0.02);
      scrollbar-gutter: stable;
    }
    #sidebar::-webkit-scrollbar { width: 7px; }
    #sidebar::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: #c5ccd6; background-clip: padding-box; }

    #sidebar-header {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
      padding: 24px 20px 16px;
      border-bottom: 0;
    }

    .brand-lockup {
      display: inline-flex;
      align-items: center;
      gap: 11px;
      color: var(--ink);
      font-size: 20px;
      font-weight: 750;
      letter-spacing: -0.04em;
    }

    .brand-mark {
      position: relative;
      width: 34px;
      height: 30px;
      display: inline-block;
      flex: 0 0 34px;
    }

    .brand-mark::before,
    .brand-mark::after {
      position: absolute;
      left: 6px;
      width: 23px;
      height: 2px;
      background: var(--orange);
      content: "";
      transform-origin: center;
    }

    .brand-mark::before { top: 14px; transform: rotate(34deg); }
    .brand-mark::after { top: 14px; transform: rotate(-34deg); }
    .brand-mark i {
      position: absolute;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: var(--orange);
      box-shadow: 0 0 0 3px #fff5eb;
    }
    .brand-mark i:nth-child(1) { top: 1px; left: 1px; }
    .brand-mark i:nth-child(2) { top: 1px; right: 1px; }
    .brand-mark i:nth-child(3) { bottom: 1px; left: 1px; }
    .brand-mark i:nth-child(4) { right: 1px; bottom: 1px; }

    #sidebar-header h2 { display: none; }
    .header-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    #btn-new-session {
      grid-column: 1 / -1;
      width: 100%;
      height: 44px;
      border-radius: 10px;
      background: var(--orange);
      box-shadow: 0 8px 18px rgba(242, 138, 34, 0.2);
      font-size: 0;
    }
    #btn-new-session::after {
      content: "＋ 新建对话";
      font-size: 14px;
      font-weight: 650;
    }
    #btn-new-session:hover { background: var(--orange-deep); }
    .pk-entry { display: none; }

    .wallet-bar {
      margin: 0 20px;
      padding: 10px 0;
      color: #707784;
      background: transparent;
      border-bottom: 1px solid var(--line);
      font-size: 12px;
    }

    #history-section {
      flex: 0 1 250px;
      margin-top: 22px;
      min-height: 160px;
    }
    .history-section-title {
      padding: 22px 8px 8px;
      border-top-color: var(--line);
    }
    #session-list {
      max-height: none;
      margin-top: 0;
      padding: 14px 12px 6px;
    }
    .sidebar-section-title {
      padding: 0 8px 8px;
      color: #8b919c;
    }
    .session-item {
      min-height: 42px;
      margin-bottom: 3px;
      padding: 9px 10px;
      border-radius: 8px;
    }
    .session-item:hover { background: #f5f6f8; }
    .session-item.active {
      position: relative;
      background: var(--orange-soft);
    }
    .session-item.active::before {
      position: absolute;
      top: 10px;
      bottom: 10px;
      left: 0;
      width: 3px;
      border-radius: 0 3px 3px 0;
      background: var(--orange);
      content: "";
    }
    .session-item.active .title { color: var(--orange-deep); font-weight: 650; }
    .session-item .title { color: #4d5562; }

    #function-navigation {
      flex: 1 1 auto;
      min-height: 0;
      margin: 8px 12px 0;
    }
    .nav-module-toggle { color: #4d5562; }
    .nav-feature-item { color: #4d5562; }
    .nav-feature-item:hover { background: #f0f2f5; }
    .nav-feature-item.active { background: var(--orange-soft); color: var(--orange-deep); }

    #main {
      gap: 0;
      padding: 0;
      background: var(--canvas);
    }

    /* 功能页暂不展示“智能问答 / 管理后台”顶部入口；保留 HTML 供后续按域名策略恢复。 */
    #desktop-topbar[hidden] { display: none; }
    #desktop-topbar {
      display: flex;
      align-items: stretch;
      min-height: 70px;
      padding: 0 32px;
      border-bottom: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.9);
    }
    .top-navigation {
      display: flex;
      align-items: stretch;
      gap: 26px;
      min-width: 0;
    }
    .top-navigation-link {
      position: relative;
      display: inline-flex;
      align-items: center;
      color: #717783;
      text-decoration: none;
      white-space: nowrap;
      font-size: 14px;
      font-weight: 600;
      transition: color 0.18s ease;
    }
    .top-navigation-link:hover { color: var(--ink); }
    .top-navigation-link.active { color: var(--ink); }
    .top-navigation-link.active::after {
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      height: 3px;
      border-radius: 3px 3px 0 0;
      background: var(--orange);
      content: "";
    }
    #results {
      flex: 1;
      max-width: 1040px;
      margin: 0 auto;
      padding: 34px clamp(26px, 5vw, 72px) 22px;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
    #results::-webkit-scrollbar { width: 7px; }
    #results::-webkit-scrollbar-thumb { border-radius: 99px; background: #d9dde3; }

    .empty-state {
      display: grid;
      min-height: 100%;
      place-items: center;
    }
    .desktop-empty-state {
      display: flex;
      align-items: center;
      flex-direction: column;
      width: min(100%, 820px);
      transform: translateY(-4%);
      text-align: center;
    }
    .desktop-empty-state h1 {
      margin: 0;
      color: var(--ink);
      font-size: clamp(28px, 2.4vw, 36px);
      font-weight: 600;
      letter-spacing: -0.04em;
      line-height: 1.2;
    }
    .recommendations {
      display: flex;
      align-items: flex-start;
      flex-direction: column;
      width: min(100%, 430px);
      margin-top: 62px;
      text-align: left;
    }
    .recommendations-label {
      margin: 0 0 13px 6px;
      color: #9aa1ab;
      font-size: 12px;
      font-weight: 500;
    }
    .recommendation-chip {
      max-width: 100%;
      margin-bottom: 10px;
      padding: 11px 15px;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--surface);
      color: #4d5562;
      cursor: pointer;
      font: inherit;
      font-size: 14px;
      line-height: 1.4;
      text-align: left;
      text-overflow: ellipsis;
      white-space: nowrap;
      transition: border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
    }
    .recommendation-chip:hover {
      border-color: #ffd4ac;
      color: var(--orange-deep);
      box-shadow: 0 7px 16px rgba(31, 35, 42, 0.05);
      transform: translateX(4px);
    }
    .hint { display: none; }

    .q-round {
      /* 用户气泡贴右，模型正文从同一内容区域的左侧开始。 */
      width: 100%;
      margin: 0 auto 26px;
      animation-duration: 0.2s;
    }
    .q-card { margin-bottom: 12px; }
    .q-card .bubble {
      max-width: 72%;
      padding: 11px 15px;
      border-color: #ffe1c2;
      border-radius: 10px 10px 3px 10px;
      background: var(--orange-soft);
      color: #5c3c21;
      font-size: 15px;
      line-height: 1.65;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
    .answer-card {
      padding: 24px 26px;
      border-color: var(--line);
      border-radius: 12px;
      background: var(--surface);
      box-shadow: 0 7px 20px rgba(31, 35, 42, 0.04);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
    .answer-card .label {
      margin-bottom: 14px;
      color: var(--orange-deep);
      font-size: 13px;
      letter-spacing: 0.02em;
    }
    .answer-card .text { color: #39414d; font-size: 16px; line-height: 1.9; }
    .answer-card .text h1,
    .answer-card .text h2,
    .answer-card .text h3 { margin: 18px 0 8px; color: var(--ink); }
    .answer-card .text h1 { font-size: 22px; }
    .answer-card .text h2 { font-size: 19px; }
    .answer-card .text h3 { font-size: 17px; }
    .answer-card .text blockquote {
      border-left-color: var(--orange);
      background: #fff9f3;
      color: #5d6470;
    }
    .answer-card .text a { color: var(--orange-deep); }
    .answer-card .text pre { background: #f5f6f8; }
    .answer-card .text code { background: #f2f3f5; }
    .copy-btn { background: #f5f6f8; color: #7a828e; }
    .copy-btn:hover { background: var(--orange-soft); color: var(--orange-deep); }

    #form {
      max-width: 900px;
      margin: 0 auto;
      padding: 0 32px 28px;
      gap: 10px;
    }
    #form #input {
      min-height: 54px;
      max-height: 168px;
      padding: 14px 19px;
      border-color: #d9dde3;
      border-radius: 14px;
      background: var(--surface);
      color: var(--ink);
      box-shadow: 0 5px 16px rgba(31, 35, 42, 0.035);
    }
    #form #input::placeholder { color: #9aa1ab; }
    #form #input:focus {
      border-color: var(--orange);
      box-shadow: 0 0 0 3px rgba(242, 138, 34, 0.14);
    }
    #form button {
      min-height: 54px;
      padding: 0 25px;
      border-radius: 14px;
      background: var(--orange);
      box-shadow: 0 7px 16px rgba(242, 138, 34, 0.2);
      font-weight: 650;
    }
    #form button:hover { background: var(--orange-deep); }

    button:focus-visible,
    a:focus-visible,
    input:focus-visible {
      outline: 3px solid rgba(242, 138, 34, 0.28);
      outline-offset: 2px;
    }
  }

  @media (min-width: 768px) and (max-width: 1024px) {
    #desktop-topbar { padding: 0 20px; }
    .top-navigation { gap: 18px; }
  }

  @media (min-width: 768px) and (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    /* 生成中的 spinner 是状态反馈，不能被通用降动画规则压成静止图标。 */
    .ai-loading-spinner,
    .ai-button-spinner,
    .chat-loading-inline i,
    .industry-status-spinner,
    .moments-image-spinner { animation-duration: .8s !important; animation-iteration-count: infinite !important; }
    .image-result-message .image-loading,
    .profile-load-spinner { animation-duration: .75s !important; animation-iteration-count: infinite !important; }
  }

  /* ========== 图片生成工作台：只替换右侧主内容 ========== */
  body.image-mode { background: #f7f9fc; }
  body.video-mode { background: #f7f9fc; }
  body.image-mode #main, body.video-mode #main { padding: 24px 36px 32px; background: #f7f9fc; overflow-y: auto; }
  body.image-mode #results,
  body.image-mode #form,
  body.image-mode #desktop-topbar { display: none; }
  body.video-mode #results,
  body.video-mode #form,
  body.video-mode #desktop-topbar { display: none; }
  /* 工作区使用侧边栏以外的全部可用宽度，大屏不再被固定最大宽度居中限制。 */
  #image-workspace, #video-workspace { width: 100%; min-width: 0; margin: 0; }
  /* 双列工作台与 #main 内容区等高：浏览器缩放时由 CSS 像素自动重算，不留底部灰色空白。 */
  body.image-mode #image-workspace,
  body.video-mode #video-workspace {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
  }
  /* 未来模型切换入口的固定位置。当前保持空白，不影响卡片内部排版。 */
  .feature-model-switch-placeholder {
    display: flex;
    align-items: center;
    height: 48px;
    margin-bottom: 18px;
    border: 1px solid #e5ebf3;
    border-radius: 12px;
    background: #fff;
  }
  .image-model-switch { gap: 12px; padding: 0 16px; }
  .image-model-switch label { color: #475467; font-size: 14px; font-weight: 600; }
  .image-model-switch select {
    min-width: 210px;
    height: 32px;
    padding: 0 30px 0 10px;
    border: 1px solid #d9e2ee;
    border-radius: 7px;
    outline: 0;
    color: #1d2939;
    background: #fff;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
  }
  .image-model-switch select:focus { border-color: #4d8dff; box-shadow: 0 0 0 3px rgba(51, 120, 246, .12); }
  .image-model-switch select:disabled { color: #98a4b5; background: #f8fafc; cursor: wait; }
  .image-generator-layout { display: grid; grid-template-columns: minmax(460px, .75fr) minmax(0, 1.25fr); flex: 1 1 auto; min-height: 0; gap: 22px; }
  .image-control-card, .image-result-card { padding: 24px; border: 1px solid #dfe6ef; border-radius: 16px; background: #fff; box-shadow: 0 7px 22px rgba(35, 61, 105, .045); }
  .image-control-card, .image-result-card { min-height: 0; height: 100%; overflow-y: auto; }
  .image-field { position: relative; margin-bottom: 18px; padding-bottom: 19px; border-bottom: 1px solid #edf1f6; }
  .image-field:last-of-type { margin-bottom: 19px; border-bottom: 0; }
  .image-field label, .image-field-label { display: block; margin-bottom: 12px; color: #1d2939; font-size: 17px; font-weight: 700; }
  #image-prompt, #video-prompt { width: 100%; height: 136px; padding: 14px 15px; border: 1px solid #d9e2ee; border-radius: 10px; outline: none; resize: vertical; color: #344054; background: #fff; font: inherit; font-size: 14px; line-height: 1.65; -webkit-user-select: text; user-select: text; }
  #image-prompt::placeholder, #video-prompt::placeholder { color: #98a4b5; }
  #image-prompt:focus, #video-prompt:focus { border-color: #4d8dff; box-shadow: 0 0 0 3px rgba(51, 120, 246, .12); }
  .image-count { position: absolute; right: 12px; bottom: 31px; color: #9aa6b7; font-size: 12px; }
  .image-drop-zone { display: flex !important; flex-direction: column; align-items: center; justify-content: center; height: 128px; gap: 5px; border: 1px dashed #7eadff; border-radius: 10px; color: #475467; background: #fbfdff; cursor: pointer; font-size: 14px; transition: .18s ease; }
  .image-drop-zone:hover, .image-drop-zone.drag-over { border-color: #3478f6; background: #f2f7ff; }
  .image-drop-zone.disabled { border-color: #d9e2ee; color: #98a4b5; background: #f8fafc; cursor: not-allowed; }
  .image-drop-zone.disabled .image-upload-icon { color: #aab4c3; }
  .image-drop-zone.disabled small { color: #667085; font-weight: 600; }
  .image-drop-zone small { color: #98a4b5; font-size: 12px; }
  .image-upload-icon { color: #3478f6; font-size: 31px; line-height: 1; }
  .image-reference-preview { position: relative; display: flex; align-items: center; min-height: 90px; gap: 12px; padding: 9px; border: 1px solid #bcd4ff; border-radius: 10px; background: #f7fbff; }
  .image-reference-preview img { width: 70px; height: 70px; border-radius: 7px; object-fit: cover; }
  .image-reference-preview span { max-width: calc(100% - 120px); overflow: hidden; color: #475467; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
  .image-reference-preview button { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; color: #667085; background: #e8eef8; cursor: pointer; font-size: 19px; line-height: 1; }
  .image-reference-preview .image-reference-reselect { right: 40px; width: auto; height: 26px; padding: 0 8px; border-radius: 6px; color: #2867df; background: #edf4ff; font-size: 12px; }
  .image-ratio-field { padding-bottom: 0; }
  .image-ratio-options { display: flex; gap: 9px; }
  .image-ratio, .video-ratio { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; min-height: 73px; gap: 7px; border: 1px solid #dce4ee; border-radius: 9px; color: #667085; background: #fff; cursor: pointer; font-size: 13px; transition: .16s ease; }
  .image-ratio:hover, .video-ratio:hover { border-color: #91b8ff; background: #f7fbff; }
  .image-ratio.active, .video-ratio.active { border-color: #3478f6; color: #2867df; background: #f2f7ff; box-shadow: inset 0 0 0 1px rgba(52,120,246,.12); }
  .image-ratio i, .video-ratio i { display: block; border: 2px solid currentColor; border-radius: 3px; }
  .shape-square { width: 22px; height: 22px; }.shape-wide { width: 27px; height: 20px; }.shape-tall { width: 19px; height: 25px; }.shape-cinema { width: 29px; height: 16px; }.shape-portrait { width: 16px; height: 28px; }
  .image-generate-button { width: 100%; min-height: 53px; border: 0; border-radius: 9px; color: #fff; background: #3478f6; box-shadow: 0 8px 16px rgba(52, 120, 246, .2); cursor: pointer; font: inherit; font-size: 17px; font-weight: 700; transition: background .16s ease, transform .16s ease; }
  .image-generate-button:hover { background: #2568e5; }.image-generate-button:active { transform: translateY(1px); }.image-generate-button:disabled { opacity: .65; cursor: wait; }
  .image-result-card { display: flex; flex-direction: column; }.image-result-card h2 { margin: 0; color: #1d2939; font-size: 19px; }
  .image-result-content { display: flex; flex: 1; align-items: center; justify-content: center; min-height: 0; padding: 20px 0; }
  .image-empty-state, .image-result-message { max-width: 460px; text-align: center; }.image-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 88px; height: 88px; border: 2px solid #80aafa; border-radius: 20px; color: #3478f6; background: #f4f8ff; font-size: 49px; box-shadow: 0 9px 18px rgba(52,120,246,.1); }
  .image-empty-state h3, .image-result-message strong { display: block; margin: 20px 0 10px; color: #1d2939; font-size: 22px; }.image-empty-state p, .image-result-message p { margin: 0; color: #7b8799; font-size: 14px; line-height: 1.7; }
  .image-result-message .image-loading { display: inline-block; width: 38px; height: 38px; border: 3px solid #d6e5ff; border-top-color: #3478f6; border-radius: 50%; animation: image-spin .75s linear infinite; }
  .image-result-message.error strong { color: #b42318; }.image-result-message.error p { color: #b5473d; }
  .image-output { max-width: 100%; text-align: center; }.image-output img { display: block; width: auto; height: auto; max-width: 100%; max-height: 500px; margin: 0 auto; object-fit: contain; border-radius: 11px; box-shadow: 0 10px 26px rgba(30, 52, 86, .16); }.image-output figcaption { margin-top: 12px; color: #16803c; font-size: 14px; font-weight: 600; }.image-output p { display: flex; justify-content: center; gap: 18px; margin: 12px 0 0; }.image-output a { color: #3478f6; font-size: 13px; }
  .video-duration-field { margin-bottom: 19px !important; padding-bottom: 0; border-bottom: 0; }
  .video-duration-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .video-duration { min-height: 42px; border: 1px solid #dce4ee; border-radius: 8px; color: #667085; background: #fff; cursor: pointer; font: inherit; font-size: 13px; }
  .video-duration:hover { border-color: #91b8ff; background: #f7fbff; }
  .video-duration.active { border-color: #3478f6; color: #2867df; background: #f2f7ff; box-shadow: inset 0 0 0 1px rgba(52,120,246,.12); }
  .video-output { width: min(100%, 760px); text-align: center; }.video-output video { display: block; width: 100%; max-height: 500px; border-radius: 11px; background: #101828; box-shadow: 0 10px 26px rgba(30, 52, 86, .16); }.video-output p { display: flex; justify-content: center; gap: 18px; margin: 12px 0 0; }.video-output a, .video-output .media-preview-action { color: #3478f6; font: inherit; font-size: 13px; }.video-output .media-preview-action { padding: 0; border: 0; background: transparent; cursor: pointer; }.video-output .media-preview-action:hover { color: #245db9; text-decoration: underline; }
  @keyframes image-spin { to { transform: rotate(360deg); } }
  @media (max-width: 980px) { body.image-mode #main, body.video-mode #main { padding: 20px 18px 24px; }.image-generator-layout { grid-template-columns: 1fr; }.image-control-card { min-height: auto; }.image-result-content { min-height: 260px; } }
  /* 视口需同时容纳桌面侧栏，1200px 以下将工作区折为单列，避免固定左列溢出。 */
  @media (min-width: 768px) and (max-width: 1200px) {
    body.image-mode #main, body.video-mode #main { padding: 20px; }
    body.image-mode #image-workspace, body.video-mode #video-workspace { display: block; }
    .image-generator-layout { grid-template-columns: minmax(0, 1fr); display: grid; }
    .image-control-card, .image-result-card { height: auto; min-height: auto; overflow: visible; }
    .image-result-content { min-height: 260px; }
  }
  @media (max-width: 767px) { body.image-mode #main, body.video-mode #main { padding-top: 60px; }.feature-model-switch-placeholder { height: 42px; margin-bottom: 14px; }.image-model-switch { gap: 8px; padding: 0 12px; }.image-model-switch select { min-width: 0; flex: 1; }.image-control-card, .image-result-card { height: auto; min-height: auto; padding: 17px 14px; overflow: visible; border-radius: 12px; }.image-ratio-options { flex-wrap: wrap; }.image-ratio, .video-ratio { flex: 0 0 calc(33.333% - 6px); }.image-result-content { min-height: 240px; } body.image-mode #image-workspace, body.video-mode #video-workspace { display: block; } }

  /* ========== 内嵌系统/外部工作台：左侧导航不刷新，只替换右侧 ========== */
  body.pk-mode #results,
  body.pk-mode #form,
  body.pk-mode #desktop-topbar,
  body.pk-mode #image-workspace,
  body.pk-mode #video-workspace,
  body.external-mode #results,
  body.external-mode #form,
  body.external-mode #desktop-topbar,
  body.external-mode #image-workspace,
  body.external-mode #video-workspace { display: none; }
  body.coming-soon-mode #results,
  body.coming-soon-mode #form,
  body.coming-soon-mode #desktop-topbar,
  body.coming-soon-mode #image-workspace,
  body.coming-soon-mode #video-workspace { display: none; }
  body.pk-mode #main,
  body.external-mode #main,
  body.coming-soon-mode #main {
    padding: 0;
    overflow: hidden;
    background: #f7f8fa;
  }
  body.profile-mode { background: #f7f9fc; }
  body.profile-mode #main { padding: 24px 36px 32px; overflow-y: auto; background: #f7f9fc; }
  body.profile-mode #results,
  body.profile-mode #form,
  body.profile-mode #desktop-topbar,
  body.profile-mode #image-workspace,
  body.profile-mode #video-workspace,
  body.profile-mode #industry-workspace,
  body.profile-mode #pk-workspace,
  body.profile-mode #external-workspace,
  body.profile-mode #coming-soon-workspace { display: none; }
  body.profile-mode #personal-profile-workspace { display: flex; flex: 1 1 auto; min-height: 0; }
  .personal-profile-workspace { width: 100%; min-width: 0; }
  .personal-profile-page { width: min(1020px, 100%); margin: 0 auto; padding: 38px 0; }
  .personal-profile-heading { max-width: 720px; margin-bottom: 24px; }
  .personal-profile-eyebrow { display: block; margin-bottom: 8px; color: #d4700e; font-size: 11px; font-weight: 750; letter-spacing: .09em; }
  .personal-profile-heading h1 { margin: 0; color: #172b4d; font-size: 30px; line-height: 1.25; }
  .personal-profile-heading p { margin: 12px 0 0; color: #667085; font-size: 15px; line-height: 1.75; }
  .profile-fill-note { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; padding: 15px 17px; border: 1px solid #f3d5b5; border-left: 4px solid #ef9a4b; border-radius: 11px; background: #fff8f0; }
  .profile-fill-note-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; color: #d4700e; }
  .profile-fill-note-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .profile-fill-note h2 { margin: 0; color: #8b4b12; font-size: 14px; line-height: 1.4; }
  .profile-fill-note p { margin: 5px 0 0; color: #6f6257; font-size: 13px; line-height: 1.65; }
  .profile-richness { margin-bottom: 22px; padding: 16px 18px; border: 1px solid #f0e1d2; border-radius: 13px; background: #fffdf9; }
  .profile-richness-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #475467; font-size: 14px; font-weight: 650; }
  .profile-richness-heading strong { color: #d4700e; font-size: 16px; }
  .profile-richness-track { height: 8px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: #f0e8df; }
  .profile-richness-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f6a35c, #e87d17); transition: width .18s ease; }
  .profile-richness p { margin: 9px 0 0; color: #7b8491; font-size: 12px; line-height: 1.55; }
  .profile-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
  .profile-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid #dde3eb; border-radius: 999px; color: #586273; background: #fff; cursor: pointer; font: inherit; font-size: 13px; font-weight: 650; transition: color .16s ease, border-color .16s ease, background .16s ease; }
  .profile-tab:hover { border-color: #f5c68a; color: #d4700e; background: #fffaf4; }
  .profile-tab.active { border-color: #ed8b2f; color: #fff; background: #ed8b2f; box-shadow: 0 3px 8px rgba(208, 112, 14, .15); }
  .profile-tab [data-profile-tab-status] { display: inline-flex; align-items: center; gap: 3px; color: #a76120; font-size: 11px; font-weight: 600; }
  .profile-tab [data-profile-tab-status][hidden] { display: none; }
  .profile-tab [data-profile-tab-status]::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
  .profile-tab.active [data-profile-tab-status] { color: #fff5e9; }
  .profile-load-status { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid #e5e9ef; border-radius: 12px; color: #667085; background: #fff; font-size: 13px; }
  .profile-load-spinner { width: 17px; height: 17px; flex: 0 0 auto; border: 2px solid #f4d3b1; border-top-color: #e87d17; border-radius: 50%; animation: profile-load-spin .75s linear infinite; }
  .profile-load-status.profile-load-error { border-color: #f3d5b5; color: #9b5e28; background: #fffaf5; }
  .profile-load-status.profile-load-error .profile-load-spinner { display: none; }
  .profile-load-status button { margin-left: auto; padding: 5px 9px; border: 1px solid #f1bd85; border-radius: 7px; color: #c86509; background: #fff; cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; }
  .profile-load-status button:hover { background: #fff2e4; }
  @keyframes profile-load-spin { to { transform: rotate(360deg); } }
  .profile-panel { padding: 26px; border: 1px solid #e4e8ef; border-radius: 15px; background: #fff; box-shadow: 0 7px 20px rgba(37, 48, 65, .04); }
  .profile-panel-heading { margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid #eef0f3; }
  .profile-panel-heading h2 { margin: 0; color: #25334a; font-size: 19px; line-height: 1.35; }
  .profile-panel-heading p { margin: 7px 0 0; color: #7b8491; font-size: 13px; line-height: 1.65; }
  .profile-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
  .profile-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: #344054; font-size: 13px; font-weight: 650; }
  .profile-field-wide { grid-column: 1 / -1; }
  .profile-field input, .profile-field textarea, .profile-field select { box-sizing: border-box; width: 100%; border: 1px solid #dce2ea; border-radius: 9px; outline: 0; color: #25334a; background: #fff; font: inherit; font-size: 14px; font-weight: 400; transition: border-color .16s ease, box-shadow .16s ease; }
  .profile-field input, .profile-field select { height: 40px; padding: 0 11px; }
  .profile-field textarea { min-height: 84px; padding: 10px 11px; line-height: 1.55; resize: vertical; }
  .profile-field input::placeholder, .profile-field textarea::placeholder { color: #a0a7b3; }
  .profile-field input:focus, .profile-field textarea:focus, .profile-field select:focus { border-color: #ed8b2f; box-shadow: 0 0 0 3px rgba(240, 133, 25, .12); }
  .profile-panel-actions { display: flex; justify-content: flex-end; margin-top: 22px; padding-top: 17px; border-top: 1px solid #eef0f3; }
  .profile-next-button { display: inline-flex; align-items: center; gap: 6px; border: 0; color: #c86509; background: transparent; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
  .profile-next-button:hover { color: #9e4f04; text-decoration: underline; }
  .profile-save-area { display: flex; justify-content: flex-end; margin-top: 20px; padding: 18px 0 4px; }
  .profile-save-area button { min-width: 132px; min-height: 42px; padding: 0 16px; border: 1px solid #f08519; border-radius: 9px; color: #fff; background: #f08519; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; }
  .profile-save-area button:hover { background: #d4700e; }
  .embedded-workspace { width: 100%; height: 100%; min-height: 0; }
  .embedded-workspace iframe { display: block; width: 100%; height: 100%; border: 0; background: #f7f8fa; }
  .external-workspace { display: flex; flex-direction: column; }
  .external-workspace-header {
    display: flex; align-items: center; justify-content: space-between;
    flex: 0 0 auto; min-height: 72px; padding: 14px 32px;
    border-bottom: 1px solid #e5e7eb; background: #fff;
  }
  .external-workspace-header span { display: block; margin-bottom: 3px; color: #8a94a3; font-size: 12px; }
  .external-workspace-header h1 { margin: 0; color: #1f2937; font-size: 20px; }
  .external-workspace-header a { color: #c45d00; font-size: 13px; text-decoration: none; }
  .external-workspace iframe { flex: 1; min-height: 0; }
  .coming-soon-workspace { display: grid; width: 100%; height: 100%; min-height: 0; place-items: center; padding: 28px; background: #fff; }
  .coming-soon-card { width: min(520px, 100%); padding: 50px 34px; border: 1px solid #f3e5d7; border-radius: 16px; background: #fffdfb; box-shadow: 0 12px 32px rgba(94, 60, 29, .07); text-align: center; }
  .coming-soon-icon { display: inline-flex; align-items: center; justify-content: center; width: 68px; height: 68px; border: 2px solid #f6a35c; border-radius: 20px; color: #e87d17; background: #fff3e7; font-size: 42px; line-height: 1; }
  .coming-soon-card p { margin: 18px 0 5px; color: #9a785b; font-size: 13px; }
  .coming-soon-card h1 { margin: 0; color: #1f2937; font-size: 25px; }
  .coming-soon-card > span:not(.coming-soon-icon) { display: block; margin-top: 14px; color: #748092; font-size: 15px; line-height: 1.6; }
  .coming-soon-card button { min-width: 150px; margin-top: 26px; padding: 10px 20px; border: 1px solid #ed8b2f; border-radius: 9px; color: #ce6706; background: #fff; font: inherit; font-size: 14px; cursor: pointer; }
  .coming-soon-card button:hover { background: #fff4e8; }
  @media (max-width: 767px) {
    body.pk-mode #main,
    body.external-mode #main,
    body.coming-soon-mode #main { padding-top: 52px; }
    .coming-soon-workspace { padding: 16px; }
    .coming-soon-card { padding: 38px 22px; }
    .external-workspace-header { min-height: 62px; padding: 10px 16px; }
    .external-workspace-header h1 { font-size: 18px; }
    body.profile-mode #main { padding: 60px 16px 20px; }
    .personal-profile-page { padding: 20px 0; }
    .personal-profile-heading { margin-bottom: 20px; }
    .personal-profile-heading h1 { font-size: 25px; }
    .personal-profile-heading p { font-size: 14px; }
    .profile-tabs { flex-wrap: nowrap; margin-right: -16px; padding-right: 16px; overflow-x: auto; }
    .profile-tab { flex: 0 0 auto; }
    .profile-panel { padding: 20px 16px; }
    .profile-field-grid { grid-template-columns: 1fr; gap: 16px; }
    .profile-field-wide { grid-column: auto; }
    .profile-save-area { display: block; }
    .profile-save-area button { width: 100%; }
    .profile-onboarding-dialog { padding: 24px 20px; }
    .profile-onboarding-actions { flex-direction: column-reverse; }
    .profile-onboarding-actions button { width: 100%; }
  }

  /* ========== 语言大模型聊天：GPT 式输入与无身份回答 ========== */
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .q-message-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 72%;
    min-width: 0;
  }
  .q-card .q-message-stack .bubble { max-width: 100%; }
  /* 用户提问同样是可复制的文本，不能继承 body 的全局禁选规则。 */
  .q-card .bubble,
  .q-card .bubble * {
    -webkit-user-select: text;
    user-select: text;
  }
  .sent-attachment {
    display: flex;
    align-items: center;
    width: min(280px, 100%);
    min-height: 62px;
    gap: 9px;
    margin: 0 0 8px auto;
    padding: 7px 9px;
    overflow: hidden;
    border: 1px solid #e2e5e9;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(31, 35, 42, 0.07);
  }
  .sent-attachment.image { display: block; width: min(360px, 100%); padding: 4px; }
  .sent-attachment.file { width: 62px; justify-content: center; padding: 7px; }
  .sent-attachment.image img {
    display: block;
    width: 100%;
    max-height: 270px;
    border-radius: 8px;
    object-fit: cover;
    background: #f3f4f6;
  }
  .sent-attachment-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 8px;
    color: #d96f0b;
    background: #fff3e7;
    font-size: 12px;
    font-weight: 700;
  }
  .answer-card.answer-content {
    position: relative;
    margin-bottom: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .answer-card.answer-content .text {
    padding-right: 0;
    color: #39414d;
    font-size: 16px;
    line-height: 1.9;
    /* body 默认禁用选中；正文及 Markdown 子元素都必须可拖选、复制。 */
    -webkit-user-select: text;
    user-select: text;
  }
  .answer-card.answer-content .text,
  .answer-card.answer-content .text * {
    -webkit-user-select: text;
    user-select: text;
  }
  .answer-actions {
    display: flex;
    align-items: center;
    min-height: 28px;
    gap: 4px;
    margin-top: 8px;
  }
  .q-message-stack .question-actions {
    align-self: flex-end;
    margin-top: 5px;
  }
  .answer-actions .copy-btn {
    position: static;
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    background: transparent;
    color: #7a828e;
    opacity: .72;
  }
  .answer-card.answer-content:hover .answer-actions .copy-btn,
  .answer-actions .copy-btn:focus-visible,
  .answer-actions .copy-btn.copied { opacity: 1; }
  .answer-actions .copy-btn:hover {
    border-color: #e1e6ed;
    background: #f5f6f8;
    color: var(--orange-deep);
  }
  #results { scrollbar-gutter: stable; }
  #results::-webkit-scrollbar { width: 7px; }
  #results::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: #c5ccd6; background-clip: padding-box; }

  #form { position: relative; align-items: flex-end; }
  #form #input {
    min-width: 0;
    padding: 11px 8px 11px 2px;
    border: 0;
    box-shadow: none;
  }
  #form #input:focus { box-shadow: none; }
  #form #btn-attach,
  #form #btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  #form #btn-attach { border-radius: 50%; color: #344054; background: transparent; font-size: 31px; font-weight: 300; line-height: 1; }
  #form #btn-attach:hover { color: #17233a; background: #f3f4f6; }
  #form #btn { border-radius: 50%; color: #fff; background: #3478f6; }
  #form #btn:hover { background: #2867df; }
  #form #btn.is-uploading { opacity: 0.65; cursor: wait; }
  #form #btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
  #form { overflow: visible; }
  #form .chat-attachment-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 12px;
    z-index: 10;
    display: grid;
    width: 236px;
    gap: 3px;
    padding: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(31, 35, 42, 0.13);
  }
  #form.has-attachment .chat-attachment-menu { bottom: calc(100% + 82px); }
  #form .chat-attachment-menu button {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    min-height: 54px;
    padding: 7px 8px;
    border: 0;
    border-radius: 8px;
    color: #344054;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    font: inherit;
    text-align: left;
  }
  #form .chat-attachment-menu button:hover { background: #f7f8fa; }
  .chat-attachment-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border-radius: 8px;
    font-size: 18px;
    line-height: 1;
  }
  .chat-attachment-menu-icon.image { color: #3478f6; background: #edf5ff; }
  .chat-attachment-menu-icon.file { color: #d96f0b; background: #fff3e7; }
  .chat-attachment-menu strong,
  .chat-attachment-menu small { display: block; }
  .chat-attachment-menu strong { font-size: 13px; font-weight: 650; }
  .chat-attachment-menu small { margin-top: 3px; color: #98a2b3; font-size: 11px; }
  .chat-attachment-preview {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 12px;
    z-index: 5;
    display: block;
    min-width: 232px;
    max-width: min(440px, calc(100% - 24px));
    max-height: 250px;
    padding: 7px 9px;
    overflow-y: auto;
    border: 1px solid #e2e5e9;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(31, 35, 42, 0.09);
  }
  .chat-attachment-list { display: flex; flex-direction: column; gap: 7px; }
  .chat-attachment-item { display: flex; align-items: center; min-width: 0; gap: 9px; }
  .chat-attachment-item img {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
    background: #f3f4f6;
  }
  .chat-attachment-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 8px;
    color: #d96f0b;
    background: #fff3e7;
    font-size: 12px;
    font-weight: 700;
  }
  .chat-attachment-meta { min-width: 0; flex: 1; }
  .chat-attachment-meta strong,
  .chat-attachment-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-attachment-meta strong { color: #344054; font-size: 13px; font-weight: 600; }
  .chat-attachment-meta small { margin-top: 4px; color: #98a2b3; font-size: 11px; }
  #form .chat-attachment-remove {
    width: 26px;
    height: 26px;
    min-height: 26px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #667085;
    background: #f2f4f7;
    box-shadow: none;
    font-size: 18px;
    line-height: 1;
  }
  #form .chat-attachment-remove:hover { color: #b42318; background: #ffebe8; }
  @media (min-width: 768px) {
    #form {
      gap: 6px;
      min-height: 72px;
      padding: 10px 14px;
      border: 1px solid #d9dde3;
      border-radius: 18px;
      background: #fff;
      box-shadow: 0 5px 16px rgba(31, 35, 42, 0.035);
    }
    #form:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242, 138, 34, 0.14); }
    #form #input { min-height: 48px; max-height: 168px; padding: 11px 8px 11px 2px; background: transparent; font-size: 16px; }
    #form #btn-attach,
    #form #btn { width: 46px; height: 46px; min-height: 46px; }
  }
  @media (max-width: 767px) {
    #form .chat-attachment-menu,
    .chat-attachment-preview { left: 8px; max-width: calc(100% - 16px); }
  }

  /* 桌面聊天页：统一提高一档阅读字号，不改变结构、间距或控件尺寸。 */
  @media (min-width: 768px) {
    .brand-lockup { font-size: 21px; }
    #btn-new-session::after { font-size: 15px; }
    .wallet-bar,
    .sidebar-section-title { font-size: 13px; }
    .nav-module-toggle,
    .nav-feature-item,
    .session-item .title,
    #btn-logout { font-size: 14px; }
    .top-navigation-link { font-size: 15px; }
    .desktop-empty-state h1 { font-size: clamp(29px, 2.4vw, 37px); }
    .recommendations-label { font-size: 13px; }
    .recommendation-chip { font-size: 15px; }
    .answer-card .label { font-size: 14px; }
    .sent-attachment-file-icon,
    .chat-attachment-file-icon { font-size: 13px; }
    #form .chat-attachment-menu strong,
    .chat-attachment-meta strong { font-size: 14px; }
    #form .chat-attachment-menu small,
    .chat-attachment-meta small { font-size: 12px; }
  }

  /* ========== 朋友圈文案工作台 ========== */
  body.moments-mode { background: #f7f9fc; }
  body.moments-mode #main { padding: 32px 38px 38px; overflow-y: auto; background: #f7f9fc; }
  body.moments-mode #results,
  body.moments-mode #form,
  body.moments-mode #desktop-topbar,
  body.moments-mode #image-workspace,
  body.moments-mode #video-workspace,
  body.moments-mode #industry-workspace,
  body.moments-mode #personal-profile-workspace,
  body.moments-mode #pk-workspace,
  body.moments-mode #external-workspace,
  body.moments-mode #coming-soon-workspace { display: none; }
  body.moments-mode #moments-workspace { display: block; width: 100%; min-width: 0; }
  .moments-page { width: min(1320px, 100%); margin: 0 auto; }
  .moments-heading { margin: 0 0 22px; }
  .moments-eyebrow { display: block; margin-bottom: 7px; color: #e36f11; font-size: 11px; font-weight: 760; letter-spacing: .1em; line-height: 1.2; }
  .moments-heading h1 { margin: 0; color: #12213a; font-family: Georgia, "Songti SC", "STSong", serif; font-size: clamp(30px, 3vw, 42px); font-weight: 700; letter-spacing: -.04em; line-height: 1.08; }
  .moments-heading p { margin: 9px 0 0; color: #65738a; font-size: 14px; line-height: 1.65; }
  .moments-tabs { display: flex; align-items: flex-end; gap: 34px; min-height: 43px; margin: 0 0 18px; border-bottom: 1px solid #e6e2dc; }
  .moments-tab { position: relative; min-height: 42px; padding: 0 1px 12px; border: 0; color: #758198; background: transparent; cursor: pointer; font: inherit; font-size: 15px; font-weight: 650; line-height: 1.2; transition: color .18s ease; }
  .moments-tab::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 99px; background: transparent; content: ""; }
  .moments-tab:hover { color: #263958; }
  .moments-tab.active { color: #12213a; }
  .moments-tab.active::after { background: #f58220; }
  .moments-layout { display: grid; grid-template-columns: minmax(348px, .73fr) minmax(0, 1.27fr); align-items: stretch; gap: 18px; min-height: min(690px, calc(100dvh - 190px)); }
  .moments-control-card,
  .moments-preview-card { min-width: 0; border: 1px solid #e7e3dc; border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(49, 40, 31, .035); }
  .moments-control-card { display: flex; flex-direction: column; padding: 27px; }
  .moments-card-heading { margin-bottom: 23px; padding-bottom: 18px; border-bottom: 1px solid #eeeae4; }
  .moments-card-heading h2,
  .moments-preview-heading h2 { margin: 0; color: #12213a; font-family: Georgia, "Songti SC", "STSong", serif; font-size: 24px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
  .moments-card-heading p { margin: 8px 0 0; color: #758198; font-size: 13px; line-height: 1.6; }
  .moments-field { position: relative; display: block; margin: 0 0 18px; color: #233550; font-size: 13px; font-weight: 700; line-height: 1.45; }
  .moments-field > span,
  .moments-field-label { display: block; margin-bottom: 8px; }
  .moments-field em,
  .moments-media-heading em { color: #9aa4b4; font-size: 11px; font-style: normal; font-weight: 500; }
  .moments-field textarea,
  .moments-field input,
  .moments-field select { width: 100%; min-height: 42px; border: 1px solid #e2e5e9; border-radius: 8px; outline: 0; color: #233550; background: #fff; font: inherit; font-size: 14px; font-weight: 400; line-height: 1.55; transition: border-color .16s ease, box-shadow .16s ease; }
  .moments-field textarea { min-height: 118px; padding: 12px 13px 23px; resize: vertical; }
  .moments-field input,
  .moments-field select { padding: 0 12px; }
  .moments-field select { appearance: auto; }
  .moments-field textarea:focus,
  .moments-field input:focus,
  .moments-field select:focus { border-color: #f3a461; box-shadow: 0 0 0 3px rgba(245, 130, 32, .11); }
  .moments-field > small { position: absolute; right: 10px; bottom: 7px; color: #a0a9b7; font-size: 11px; font-weight: 500; }
  .moments-field > small b { font-weight: 600; }
  .moments-choice-row { display: flex; flex-wrap: wrap; gap: 7px; }
  .moments-choice { display: inline-flex; align-items: center; min-height: 34px; padding: 0 11px; border: 1px solid #e3e6ea; border-radius: 7px; color: #65738a; background: #fff; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; transition: border-color .16s ease, color .16s ease, background .16s ease; }
  .moments-choice i { width: 8px; height: 8px; margin-right: 7px; border: 1px solid #b8c0ca; border-radius: 50%; }
  .moments-choice:hover { border-color: #f1c498; color: #c9620d; }
  .moments-choice.active { border-color: transparent; color: #dc700e; background: #fff4e8; }
  .moments-choice.active i { border-color: #f58220; background: #f58220; box-shadow: inset 0 0 0 2px #fff4e8; }
  .moments-select-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .moments-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -1px 0 18px; color: #233550; font-size: 13px; font-weight: 700; }
  .moments-switch span { display: flex; align-items: baseline; gap: 6px; }
  .moments-switch small { color: #8d99aa; font-size: 11px; font-weight: 500; }
  .moments-switch input { position: absolute; opacity: 0; pointer-events: none; }
  .moments-switch i { position: relative; width: 38px; height: 22px; border-radius: 99px; background: #d5dbe2; transition: background .18s ease; }
  .moments-switch i::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(25, 34, 48, .2); content: ""; transition: transform .18s ease; }
  .moments-switch input:checked + i { background: #f58220; }
  .moments-switch input:checked + i::after { transform: translateX(16px); }
  .moments-media-picker { margin: 1px 0 22px; padding-top: 17px; border-top: 1px solid #eeeae4; }
  .moments-media-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #233550; font-size: 13px; font-weight: 700; }
  .moments-media-heading small { color: #98a2b3; font-size: 11px; font-weight: 500; }
  .moments-media-list { display: flex; flex-wrap: wrap; gap: 8px; }
  .moments-media-list:empty { display: none; }
  .moments-media-item { position: relative; width: 54px; height: 54px; overflow: hidden; border-radius: 7px; background: #f3f2ef; }
  .moments-media-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .moments-media-item button { position: absolute; top: 3px; right: 3px; display: grid; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; place-items: center; color: #fff; background: rgba(18, 33, 58, .72); cursor: pointer; font-size: 15px; line-height: 1; }
  .moments-media-add { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; padding: 0; border: 0; color: #65738a; background: transparent; cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; }
  .moments-media-add span { display: inline-grid; width: 19px; height: 19px; border: 1px solid #cbd1d9; border-radius: 5px; place-items: center; color: #55647a; font-size: 17px; font-weight: 400; line-height: 1; }
  .moments-media-add:hover { color: #d66a0a; }
  .moments-reference-picker { margin: 1px 0 20px; padding: 14px; border: 1px dashed #e2d5c5; border-radius: 9px; background: #fdfbf8; }
  .moments-reference-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: #233550; font-size: 13px; font-weight: 700; }
  .moments-reference-heading small { color: #8d99aa; font-size: 11px; font-weight: 500; text-align: right; }
  .moments-reference-heading em { color: #9aa4b4; font-size: 11px; font-style: normal; font-weight: 500; }
  .moments-reference-description { margin: 6px 0 10px; color: #7c8798; font-size: 11px; line-height: 1.55; }
  .moments-reference-preview:empty { display: none; }
  .moments-reference-item { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 9px; margin-bottom: 10px; padding: 6px; border: 1px solid #ebe6df; border-radius: 7px; background: #fff; }
  .moments-reference-item img { display: block; width: 50px; height: 50px; border-radius: 5px; object-fit: cover; }
  .moments-reference-name { overflow: hidden; color: #526176; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .moments-reference-item button { padding: 4px 6px; border: 0; color: #a26050; background: transparent; cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; }
  .moments-reference-item button:hover { color: #c44e36; }
  .moments-reference-add { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; color: #65738a; background: transparent; cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; }
  .moments-reference-add span { display: inline-grid; width: 19px; height: 19px; border: 1px solid #cbd1d9; border-radius: 5px; place-items: center; color: #55647a; font-size: 17px; font-weight: 400; line-height: 1; }
  .moments-reference-add:hover { color: #d66a0a; }
  .moments-submit { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 52px; margin-top: auto; border: 0; border-radius: 9px; color: #fff; background: #12213a; box-shadow: 0 9px 18px rgba(18, 33, 58, .16); cursor: pointer; font: inherit; font-size: 15px; font-weight: 700; transition: background .16s ease, transform .16s ease; }
  .moments-submit span { color: #ff9d46; font-size: 17px; }
  .moments-submit:hover { background: #203656; }
  .moments-submit:active { transform: translateY(1px); }
  .moments-submit:disabled { opacity: .68; cursor: wait; }
  .moments-preview-card { display: flex; flex-direction: column; padding: 27px 30px 18px; }
  .moments-preview-heading { padding-bottom: 18px; border-bottom: 1px solid #eeeae4; }
  .moments-preview-heading .moments-eyebrow { margin-bottom: 6px; color: #8390a4; }
  .moments-preview-content { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; padding: 25px 4px 0; }
  .moments-empty-preview { display: grid; flex: 1; min-height: 300px; place-content: center; color: #718096; text-align: center; }
  .moments-empty-preview::before { width: 34px; height: 34px; margin: 0 auto 13px; border: 1px solid #d9d6cf; border-radius: 9px; background: #f2eee7; content: ""; }
  .moments-empty-preview strong { color: #34435b; font-size: 14px; }
  .moments-empty-preview p { max-width: 260px; margin: 7px 0 0; color: #98a2b3; font-size: 12px; line-height: 1.65; }
  .moments-post { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; max-width: 660px; padding: 4px 0 21px; }
  .moments-post-header { display: contents; }
  .moments-avatar-placeholder { grid-column: 1; grid-row: 1 / span 5; width: 44px; height: 44px; border: 1px solid #e1e3e6; border-radius: 4px; background: #eef0f2; }
  .moments-post-author { grid-column: 2; color: #576b95; font-size: 15px; font-weight: 650; line-height: 1.35; }
  .moments-post-body { grid-column: 2; margin: 5px 0 0; color: #1f2937; font-size: 15px; font-weight: 400; line-height: 1.72; white-space: pre-wrap; word-break: break-word; }
  .moments-post-media { display: grid; grid-column: 2; grid-template-columns: repeat(3, minmax(0, 122px)); gap: 4px; width: min(100%, 374px); margin-top: 10px; }
  .moments-post-media img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #f1f1f1; }
  .moments-post-media.count-1 { grid-template-columns: minmax(0, 280px); }
  .moments-post-media.count-1 img { aspect-ratio: auto; max-height: 290px; }
  .moments-post-meta { display: flex; grid-column: 2; align-items: center; justify-content: space-between; gap: 10px; width: min(100%, 430px); margin-top: 10px; color: #a5adb8; font-size: 12px; }
  .moments-post-menu { min-width: 38px; height: 24px; padding: 0 8px 4px; border: 0; border-radius: 5px; color: #617498; background: #f4f5f6; cursor: pointer; font-size: 17px; font-weight: 800; letter-spacing: 2px; line-height: 1; }
  .moments-post.is-text-only .moments-post-body { max-width: 510px; }
  .moments-comments { display: block; grid-column: 2; width: min(100%, 520px); margin-top: 11px; padding: 11px 13px; border-radius: 5px; color: #26354a; background: #f3f4f5; font-size: 13px; line-height: 1.65; }
  .moments-comments p { margin: 0; white-space: pre-wrap; }
  .moments-comments strong { color: #576b95; font-weight: 650; }
  .moments-preview-actions { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 17px 0 1px; border-top: 1px solid #eeeae4; }
  .moments-preview-actions button { padding: 4px 4px; border: 0; color: #62728a; background: transparent; cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; }
  .moments-preview-actions button + button { padding-left: 20px; border-left: 1px solid #e8e5df; }
  .moments-preview-actions button:hover { color: #d66a0a; }
  .moments-preview-content .inline-native-image-result { grid-column: 2; margin: 8px 0 0 62px !important; max-width: 374px; }
  .moments-preview-content .inline-native-image-result img { max-width: 100%; border-radius: 4px; }
  .moments-image-empty { min-height: 360px; }
  .moments-image-status { display: grid; flex: 1; min-height: 320px; place-content: center; text-align: center; }
  .moments-image-status strong { color: #263954; font-size: 15px; }
  .moments-image-status p { max-width: 290px; margin: 8px 0 0; color: #8c98a9; font-size: 12px; line-height: 1.65; }
  .moments-image-spinner { width: 26px; height: 26px; margin: 0 auto 14px; border: 2px solid #f2d2b4; border-top-color: #f58220; border-radius: 50%; animation: ai-spin .8s linear infinite; }
  .moments-image-status.is-error { padding: 28px; border: 1px solid #f3d3ce; border-radius: 10px; color: #9c3527; background: #fff8f6; }
  .moments-image-status.is-error strong { color: #9c3527; }
  .moments-image-status.is-error p { color: #ad6259; }
  .moments-image-status.is-error button { justify-self: center; margin-top: 14px; padding: 8px 13px; border: 1px solid #efb4ab; border-radius: 7px; color: #9c3527; background: #fff; cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; }
  .moments-generated-image { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; min-height: 360px; margin: 0; padding: 8px 0 18px; }
  .moments-generated-image img { display: block; max-width: min(100%, 640px); max-height: min(62dvh, 560px); border-radius: 8px; box-shadow: 0 8px 24px rgba(36, 44, 56, .1); object-fit: contain; }
  .moments-image-actions { flex-wrap: wrap; margin-top: 0; }
  .moments-image-actions button + button { padding-left: 15px; }
  .moments-image-prompt { margin-top: 15px; padding: 13px 14px; border: 1px solid #e9e5de; border-radius: 8px; background: #faf9f7; }
  .moments-image-prompt strong { display: block; margin-bottom: 7px; color: #536178; font-size: 12px; font-weight: 700; }
  .moments-image-prompt p { margin: 0; color: #69758a; font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
  @media (max-width: 1100px) {
    body.moments-mode #main { padding: 24px; }
    .moments-layout { grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr); }
    .moments-control-card { padding: 22px; }
    .moments-preview-card { padding: 22px; }
  }
  @media (max-width: 860px) {
    .moments-layout { grid-template-columns: 1fr; min-height: 0; }
    .moments-control-card { min-height: auto; }
    .moments-preview-card { min-height: 450px; }
    .moments-submit { margin-top: 8px; }
  }
  @media (max-width: 767px) {
    body.moments-mode #main { padding: 66px 14px 20px; }
    .moments-heading { margin-bottom: 16px; }
    .moments-heading h1 { font-size: 31px; }
    .moments-tabs { gap: 22px; overflow-x: auto; margin-right: -14px; padding-right: 14px; }
    .moments-tab { flex: 0 0 auto; font-size: 14px; }
    .moments-control-card,
    .moments-preview-card { padding: 20px 16px; border-radius: 12px; }
    .moments-card-heading h2,
    .moments-preview-heading h2 { font-size: 22px; }
    .moments-select-grid { grid-template-columns: 1fr; gap: 0; }
    .moments-media-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
    .moments-reference-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
    .moments-reference-heading small { text-align: left; }
    .moments-post { grid-template-columns: 42px minmax(0, 1fr); column-gap: 11px; }
    .moments-avatar-placeholder { width: 38px; height: 38px; }
    .moments-post-body { font-size: 14px; }
    .moments-post-media { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
    .moments-preview-actions { margin-top: 22px; }
    .moments-preview-content .inline-native-image-result { margin-left: 49px !important; }
    .moments-generated-image { min-height: 285px; }
    .moments-generated-image img { max-height: 450px; }
  }

  /* ========== 行业应用工作区 ========== */
  body.industry-mode { background: #f7f9fc; }
  body.industry-mode #main { padding: 24px 36px 32px; overflow-y: auto; background: #f7f9fc; }
  body.industry-mode #results,
  body.industry-mode #form,
  body.industry-mode #desktop-topbar,
  body.industry-mode #image-workspace,
  body.industry-mode #video-workspace { display: none; }
  #industry-workspace, #image-workspace { width: 100%; min-width: 0; margin: 0; }
  body.industry-mode #industry-workspace { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
  .industry-pane:not(.hidden) { display: flex; flex: 1 1 auto; min-height: 0; }
  .industry-layout { display: grid; grid-template-columns: minmax(420px, .78fr) minmax(0, 1.22fr); flex: 1 1 auto; min-height: 0; gap: 22px; }
  .industry-control-card, .industry-result-card { padding: 24px; border: 1px solid #dfe6ef; border-radius: 16px; background: #fff; box-shadow: 0 7px 22px rgba(35, 61, 105, .045); }
  .industry-control-card, .industry-result-card { min-height: 0; height: 100%; overflow-y: auto; }
  .industry-card-heading { margin: 0 0 22px; padding-bottom: 17px; border-bottom: 1px solid #edf1f6; }
  .industry-eyebrow { display: block; margin-bottom: 6px; color: #7a8ba7; font-size: 11px; font-weight: 700; letter-spacing: .08em; line-height: 1.2; }
  .industry-card-heading h2 { margin: 0; color: #172b4d; font-size: 20px; line-height: 1.3; }
  .industry-card-heading p { margin: 8px 0 0; color: #6e7f99; font-size: 13px; line-height: 1.65; }
  .industry-field { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #edf1f6; }
  .industry-field:last-of-type { margin-bottom: 19px; border-bottom: 0; }
  .industry-field label, .industry-field-label { display: block; margin: 0 0 9px; color: #1d2939; font-size: 14px; font-weight: 700; }
  .industry-field input, .industry-field textarea, .industry-field select, #ecommerce-requirements {
    box-sizing: border-box; width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #d9e2ee; border-radius: 9px; outline: 0; color: #344054; background: #fff; font: inherit; font-size: 14px;
  }
  .industry-field textarea, #ecommerce-requirements { min-height: 76px; resize: vertical; line-height: 1.55; }
  .industry-field input:focus, .industry-field textarea:focus, .industry-field select:focus, #ecommerce-requirements:focus { border-color: #4d8dff; box-shadow: 0 0 0 3px rgba(51,120,246,.12); }
  .industry-generate-button { width: 100%; min-height: 50px; border: 0; border-radius: 10px; color: #fff; background: #3478f6; box-shadow: 0 8px 16px rgba(52, 120, 246, .2); cursor: pointer; font: inherit; font-size: 16px; font-weight: 700; transition: background .16s ease, transform .16s ease; }
  .industry-generate-button:hover { background: #2568e5; }
  .industry-generate-button:active { transform: translateY(1px); }
  .industry-generate-button:disabled { opacity: .65; cursor: wait; }
  .industry-result-card { display: flex; flex-direction: column; }
  .industry-result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 17px; border-bottom: 1px solid #edf1f6; }
  .industry-result-heading .industry-eyebrow { margin-bottom: 5px; }
  .industry-result-card h2 { margin: 0; color: #172b4d; font-size: 20px; line-height: 1.3; }
  .industry-result-status { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 5px; margin-top: 2px; padding: 5px 9px; border-radius: 99px; color: #4d76b9; background: #f2f6fe; font-size: 12px; line-height: 1.2; }
  .industry-result-status.is-loading { color: #2867df; background: #eef4ff; }
  .industry-status-spinner { width: 12px; height: 12px; border: 2px solid #c8dcff; border-top-color: #3478f6; border-radius: 50%; animation: ai-spin .8s linear infinite; }
  .industry-result-content { display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 20px 0; }
  .industry-result-content > .image-empty-state { display: grid; min-height: 0; height: 100%; place-content: center; }
  .plan-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .plan-results-placeholder { flex: 1; grid-auto-rows: minmax(108px, 1fr); }
  .plan-result-card { padding: 16px; border: 1px solid #e5ebf3; border-radius: 12px; background: #fbfcfe; }
  .plan-result-card.wide { grid-column: 1 / -1; }
  .plan-result-card h3 { margin: 0 0 9px; color: #344054; font-size: 14px; }
  .plan-result-card p { margin: 0; color: #475467; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
  .plan-result-card ul { margin: 0; padding-left: 19px; color: #475467; font-size: 14px; line-height: 1.7; }
  .post-result { display: grid; gap: 14px; }
  .post-result-placeholder { flex: 1; grid-template-rows: minmax(112px, 1fr) minmax(218px, 2.25fr) minmax(112px, 1fr); }
  .post-result-section { position: relative; padding: 16px; border: 1px solid #e5ebf3; border-radius: 12px; background: #fbfcfe; }
  .post-result-section h3 { margin: 0 0 10px; padding-right: 80px; color: #344054; font-size: 14px; }
  .post-result-section p { margin: 0; color: #475467; font-size: 14px; line-height: 1.75; white-space: pre-wrap; }
  .copy-result-button { position: absolute; top: 12px; right: 12px; padding: 5px 9px; border: 1px solid #cfe0fb; border-radius: 7px; color: #2867df; background: #fff; cursor: pointer; font: inherit; font-size: 12px; }
  .copy-result-button:hover { background: #f2f7ff; }
  .copy-result-button:disabled { opacity: .48; cursor: default; }
  .copy-all-button { width: 100%; margin-top: 2px; padding: 10px; border: 1px solid #cfe0fb; border-radius: 8px; color: #2867df; background: #fff; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; }
  .result-skeleton { display: block; width: 100%; min-height: 14px; border-radius: 99px; background: linear-gradient(90deg, #edf1f7 20%, #f7f9fc 38%, #edf1f7 56%); background-size: 260% 100%; animation: industry-skeleton-shimmer 1.5s ease-in-out infinite; }
  .result-skeleton.lines-2 { height: 42px; }
  .result-skeleton.lines-3 { height: 64px; }
  .result-skeleton.lines-7 { height: 156px; }
  .result-skeleton.pills { height: 28px; width: 72%; }
  .result-skeleton.colors { height: 44px; width: 55%; border-radius: 14px; }
  @keyframes industry-skeleton-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
  .industry-inline-error { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #f5c6c4; border-radius: 9px; color: #b42318; background: #fff1f0; font-size: 13px; line-height: 1.45; }
  .industry-inline-error strong { flex: 0 0 auto; }
  .choice-options { display: flex; flex-wrap: wrap; gap: 8px; }
  .choice-option { min-height: 34px; padding: 0 11px; border: 1px solid #dce4ee; border-radius: 8px; color: #667085; background: #fff; cursor: pointer; font: inherit; font-size: 13px; }
  .choice-option.active { border-color: #3478f6; color: #2867df; background: #f2f7ff; }
  @media (max-width: 980px) {
    body.industry-mode #main { padding: 20px 18px 24px; }
    .industry-layout { grid-template-columns: 1fr; }
    .industry-control-card { min-height: auto; }
    .industry-result-content { min-height: 260px; }
  }
  @media (min-width: 768px) and (max-width: 1200px) {
    body.industry-mode #main { padding: 20px; }
    body.industry-mode #industry-workspace, .industry-pane:not(.hidden) { display: block; }
    .industry-layout { grid-template-columns: minmax(0, 1fr); display: grid; }
    .industry-control-card, .industry-result-card { height: auto; min-height: auto; overflow: visible; }
    .industry-result-content { min-height: 260px; }
  }
  @media (max-width: 767px) {
    body.industry-mode #main { padding-top: 60px; }
    body.industry-mode #industry-workspace, .industry-pane:not(.hidden) { display: block; }
    .industry-control-card, .industry-result-card { height: auto; min-height: auto; padding: 17px 14px; overflow: visible; border-radius: 12px; }
    .industry-result-content { min-height: 330px; }
    .plan-results { grid-template-columns: 1fr; }
    .plan-result-card.wide { grid-column: auto; }
  }
