  /* AI 写作 · 项目列表（墨绿创作色，与笔记暖纸感区分） */
  html.web-page-aiw,
  html:has(.aiw-page) {
    --aiw-accent: #059669;
    --aiw-accent-mid: #10b981;
    --aiw-accent-deep: #047857;
    --web-ui-accent: var(--aiw-accent);
    --web-scroll-thumb: rgba(100, 116, 139, 0.34);
    --web-scroll-thumb-hover: rgba(5, 150, 105, 0.44);
    --web-scroll-thumb-active: rgba(4, 120, 87, 0.56);
  }
  html.web-page-aiw,
  html.web-page-aiw body,
  html:has(.aiw-page),
  html:has(.aiw-page) body {
    background: #eef6f2 !important;
    background-color: #eef6f2 !important;
    background-image: none !important;
  }
  html.web-theme-dark.web-page-aiw,
  html.web-theme-dark:has(.aiw-page) {
    --aiw-accent: #34d399;
    --aiw-accent-mid: #6ee7b7;
    --aiw-accent-deep: #10b981;
    --web-ui-accent: var(--aiw-accent);
    --web-scroll-thumb: rgba(148, 163, 184, 0.32);
    --web-scroll-thumb-hover: rgba(52, 211, 153, 0.44);
    --web-scroll-thumb-active: rgba(16, 185, 129, 0.58);
  }
  html.web-theme-dark.web-page-aiw,
  html.web-theme-dark.web-page-aiw body,
  html.web-theme-dark:has(.aiw-page),
  html.web-theme-dark:has(.aiw-page) body {
    background: #0c1210 !important;
    background-color: #0c1210 !important;
    background-image: none !important;
  }

  @supports (color: color-mix(in srgb, white, black)) {
    html.web-page-aiw,
    html:has(.aiw-page) {
      --web-scroll-thumb: color-mix(in srgb, var(--aiw-accent) 32%, transparent);
      --web-scroll-thumb-hover: color-mix(in srgb, var(--aiw-accent) 48%, transparent);
      --web-scroll-thumb-active: color-mix(in srgb, var(--aiw-accent) 66%, transparent);
    }
    html.web-theme-dark.web-page-aiw,
    html.web-theme-dark:has(.aiw-page) {
      --web-scroll-thumb: color-mix(in srgb, var(--aiw-accent) 30%, transparent);
      --web-scroll-thumb-hover: color-mix(in srgb, var(--aiw-accent) 46%, transparent);
      --web-scroll-thumb-active: color-mix(in srgb, var(--aiw-accent) 62%, transparent);
    }
  }

  html.web-page-aiw .web-footer,
  html:has(.aiw-page) .web-footer {
    border-color: rgba(100, 116, 139, 0.16);
    background: rgba(250, 253, 252, 0.78);
    color: #64748b;
  }
  html.web-theme-dark.web-page-aiw .web-footer,
  html.web-theme-dark:has(.aiw-page) .web-footer {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(21, 31, 27, 0.62);
    color: #94a3b8;
  }

  .aiw-page {
    --aiw-canvas-bg: #eef6f2;
    --aiw-paper-bg: #fafdfc;
    --aiw-accent: #059669;
    --aiw-accent-mid: #10b981;
    --aiw-accent-deep: #047857;
    --aiw-accent-soft: rgba(5, 150, 105, 0.12);
    --aiw-border: rgba(100, 116, 139, 0.16);
    --aiw-text-muted: #64748b;
    --aiw-gutter-x: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 8px var(--aiw-gutter-x) 32px;
    box-sizing: border-box;
    border-radius: 0;
    background: var(--aiw-canvas-bg);
  }
  html.web-theme-dark .aiw-page {
    --aiw-canvas-bg: #0c1210;
    --aiw-paper-bg: #151f1b;
    --aiw-accent: #34d399;
    --aiw-accent-mid: #6ee7b7;
    --aiw-accent-deep: #10b981;
    --aiw-accent-soft: rgba(52, 211, 153, 0.14);
    --aiw-border: rgba(148, 163, 184, 0.18);
    --aiw-text-muted: #94a3b8;
    background: var(--aiw-canvas-bg);
  }

  .aiw-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid var(--aiw-border);
    background: var(--aiw-paper-bg);
    box-shadow: 0 4px 24px rgba(28, 25, 23, 0.06);
  }
  html.web-theme-dark .aiw-hero {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  }
  .aiw-hero-text {
    min-width: 0;
    flex: 1 1 240px;
  }
  .aiw-list-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: 0.01em;
    color: var(--web-text);
  }
  .aiw-list-sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--aiw-text-muted, var(--web-muted));
  }
  .aiw-create-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 10px 20px;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--aiw-accent-mid, #10b981), var(--aiw-accent, #059669));
    box-shadow: 0 8px 22px rgba(5, 150, 105, 0.28);
    transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
  }
  .aiw-create-btn:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(5, 150, 105, 0.34);
  }
  .aiw-create-btn:active {
    transform: translateY(0);
  }

  .aiw-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
    gap: 8px;
    margin-bottom: 22px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--aiw-border);
    background: rgba(250, 253, 252, 0.78);
  }
  html.web-theme-dark .aiw-features {
    background: rgba(21, 31, 27, 0.55);
  }
  .aiw-feat {
    font-size: 12px;
    font-weight: 600;
    color: var(--aiw-text-muted, var(--web-muted));
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 1.35;
    min-height: 22px;
  }
  .aiw-feat .mdi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--aiw-accent, #059669);
    font-size: 17px;
    line-height: 1;
    flex-shrink: 0;
    margin: 0;
    width: 17px;
    height: 17px;
  }
  .aiw-feat .mdi::before {
    line-height: 1;
  }
  .aiw-feat > span:not(.mdi) {
    line-height: 1.35;
  }

  .aiw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: 16px;
  }
  .aiw-card {
    border: 1px solid var(--aiw-border, var(--web-border));
    border-radius: 18px;
    background: var(--aiw-paper-bg, var(--web-surface));
    box-shadow: 0 2px 12px rgba(28, 25, 23, 0.05);
    min-height: 220px;
    overflow: hidden;
    position: relative;
    transition: transform 0.16s ease, box-shadow 0.18s ease;
  }
  html.web-theme-dark .aiw-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
  }
  .aiw-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.1);
  }
  html.web-theme-dark .aiw-card:hover {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  }
  /* 链接铺满整张卡（Chrome 下 relative+height:100% 会塌缩，封面无法全幅） */
  .aiw-card:not(.aiw-card--new) > .aiw-card-link {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 220px;
    text-decoration: none;
    color: inherit;
    outline: none;
  }
  .aiw-card:not(.aiw-card--new) > .aiw-card-link:focus-visible {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.28);
    border-radius: 18px;
  }
  .aiw-card-media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.1), rgba(238, 246, 242, 0.94));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(5, 150, 105, 0.26);
    font-size: 48px;
    overflow: hidden;
  }
  .aiw-card-media:has(img) {
    background: rgba(28, 25, 23, 0.04);
    color: transparent;
  }
  .aiw-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  html.web-theme-dark .aiw-card-media {
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.14), rgba(12, 18, 16, 0.9));
    color: rgba(52, 211, 153, 0.28);
  }
  html.web-theme-dark .aiw-card-media:has(img) {
    background: rgba(0, 0, 0, 0.2);
    color: transparent;
  }
  .aiw-card-glass {
    position: absolute;
    z-index: 2;
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 10px 12px 11px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(28, 25, 23, 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    min-width: 0;
  }
  html.web-theme-dark .aiw-card-glass {
    background: rgba(0, 0, 0, 0.48);
    border-color: rgba(255, 255, 255, 0.1);
  }
  .aiw-card-name {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aiw-card-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.74);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aiw-card-del {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(28, 25, 23, 0.58);
    color: rgba(255, 255, 255, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .aiw-card:hover .aiw-card-del {
    display: flex;
  }
  .aiw-card-del:hover {
    background: rgba(220, 38, 38, 0.78);
    border-color: rgba(255, 255, 255, 0.34);
  }
  .aiw-card-del:active {
    transform: translateY(1px);
  }
  .aiw-card--new {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    border-style: dashed;
    border-radius: 18px;
    cursor: pointer;
    width: 100%;
    font: inherit;
    color: inherit;
    background: rgba(250, 253, 252, 0.38);
    padding: 0;
  }
  html.web-theme-dark .aiw-card--new {
    background: rgba(21, 31, 27, 0.28);
  }
  .aiw-card--new:hover {
    border-color: rgba(5, 150, 105, 0.38);
    background: rgba(5, 150, 105, 0.05);
  }
  .aiw-card--new .aiw-card-new-ic {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.06));
    color: var(--aiw-accent, #059669);
    font-size: 28px;
    margin-bottom: 12px;
  }
  .aiw-card--new .aiw-card-new-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--web-text);
  }
  .aiw-card--new .aiw-card-new-sub {
    font-size: 12px;
    color: var(--aiw-text-muted, var(--web-muted));
    margin-top: 4px;
  }

  .aiw-empty {
    text-align: center;
    padding: 40px 16px;
    border-radius: 16px;
    border: 1px dashed var(--aiw-border);
    background: rgba(250, 253, 252, 0.55);
    color: var(--aiw-text-muted, var(--web-muted));
    font-size: 14px;
  }
  html.web-theme-dark .aiw-empty {
    background: rgba(21, 31, 27, 0.35);
  }

  /* 删除确认弹窗 */
  .ai-del-modal {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
  }
  .ai-del-modal.is-open {
    display: flex;
  }
  /* 挂到 body 后脱离 #webMain transform containing block（Chrome 弹窗居中） */
  body > #aiwDeleteProjectModal.ai-del-modal {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
  }
  body > #aiwDeleteProjectModal.ai-del-modal.is-open {
    display: flex !important;
  }
  .ai-del-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 25, 23, 0.38);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.22s ease;
  }
  .ai-del-modal.is-open .ai-del-modal__backdrop {
    opacity: 1;
  }
  html.web-theme-dark .ai-del-modal__backdrop {
    background: rgba(0, 0, 0, 0.55);
  }
  .ai-del-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    background: var(--aiw-paper-bg, #fafdfc);
    border: 1px solid var(--aiw-border, rgba(100, 116, 139, 0.16));
    box-shadow: 0 24px 64px rgba(28, 25, 23, 0.14);
    transform: scale(0.96) translateY(8px);
    opacity: 0;
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
  }
  .ai-del-modal.is-open .ai-del-modal__dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  html.web-theme-dark .ai-del-modal__dialog {
    background: rgba(21, 31, 27, 0.98);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  }
  .ai-del-modal .web-prompt-inner {
    padding: 26px 22px 22px;
    text-align: center;
  }
  .ai-del-modal .web-prompt-ico {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
  }
  .ai-del-modal .web-prompt-ico--danger {
    background: rgba(254, 226, 226, 0.95);
    color: #dc2626;
  }
  html.web-theme-dark .ai-del-modal .web-prompt-ico--danger {
    background: rgba(127, 29, 29, 0.35);
    color: #fca5a5;
  }
  .ai-del-modal .web-prompt-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--web-text);
    line-height: 1.35;
    margin: 0 0 12px;
  }
  .ai-del-modal .web-prompt-body {
    font-size: 14px;
    line-height: 1.55;
    color: var(--aiw-text-muted, var(--web-muted));
    margin: 0 0 4px;
    text-align: center;
  }
  .ai-del-modal .web-prompt-body strong:not(.web-prompt-danger) {
    color: var(--web-text);
    font-weight: 700;
  }
  .ai-del-modal .web-prompt-danger {
    color: #dc2626;
    font-weight: 800;
  }
  html.web-theme-dark .ai-del-modal .web-prompt-danger {
    color: #f87171;
  }
  .ai-del-modal .web-prompt-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
  }
  .ai-del-modal .web-prompt-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    padding: 11px 24px;
    min-width: 112px;
    border-radius: 999px;
    transition: transform 0.12s ease, box-shadow 0.16s ease, filter 0.16s ease;
  }
  .ai-del-modal .web-prompt-btn:active {
    transform: scale(0.98);
  }
  .ai-del-modal .web-prompt-btn--ghost {
    background: var(--aiw-paper-bg, #fff);
    color: var(--web-text);
    border: 1px solid var(--aiw-border);
  }
  .ai-del-modal .web-prompt-btn--danger {
    background: linear-gradient(180deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.28);
  }
  .ai-del-modal .web-prompt-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.28);
  }
