﻿/* Kreata · 青少年AI灵感工坊 — 全站样式（自 index.html 提取） */

/* ===== 基础 / 布局 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
    html {
      height: 100%;
      overscroll-behavior-y: none;
    }
    body {
      font-family: 'Segoe UI', 'Poppins', 'Roboto', system-ui, -apple-system, sans-serif;
      background: linear-gradient(145deg, #f9f3ff 0%, #eef0ff 100%);
      min-height: 100vh; display: flex; flex-direction: column; color: #2c2c3a;
      overscroll-behavior-y: none;
      -webkit-overflow-scrolling: touch;
    }
    .app-wrapper { max-width: 1200px; margin: 0 auto; width: 100%; padding: 0 20px; display: flex; flex-direction: column; min-height: 100vh; overscroll-behavior-y: none; }
    .navbar {
      display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap !important; column-gap: 15px;
      background: rgba(255,255,255,0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
      border-radius: 60px; margin: 20px 0 15px; padding: 10px 25px;
      box-shadow: 0 15px 35px rgba(107,72,255,0.12), 0 5px 15px rgba(0,0,0,0.05);
      border: 1px solid rgba(255,255,255,0.7);
    }
    @media (max-width: 760px) {
      .navbar { flex-wrap: wrap !important; row-gap: 10px; }
      .nav-links { order: 3; flex-basis: 100%; justify-content: flex-start; white-space: normal; }
    }
    .logo { font-size: 1.8rem; font-weight: 700; background: linear-gradient(135deg,#9b6dff,#5f4bdb); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: opacity .2s ease, transform .2s ease; }
    .logo:hover { opacity: .88; }
    .logo:active { transform: scale(.98); }
    .logo i { -webkit-text-fill-color: #ffb347; font-size: 2rem; }
    .logo-img { height: 40px; width: auto; display: block; }
    .logo-word { font-size: 1.8rem; font-weight: 700; background: linear-gradient(135deg,#2bb673,#1a5fa8); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
    .nav-links { display: flex; gap: clamp(6px,1.2vw,16px); align-items: center; flex-wrap: nowrap; white-space: nowrap; flex: 1 1 auto; justify-content: center; }
    .nav-item { text-decoration: none; font-weight: 600; font-size: 0.92rem; padding: 8px 11px; border-radius: 40px; color: #3d3a5c; transition: all .3s ease; display: flex; align-items: center; gap: 5px; white-space: nowrap; cursor:pointer; }
    .nav-item:hover { background: rgba(155,109,255,0.15); color: #5f4bdb; }
    .nav-item.active { background: #5f4bdb; color: white; box-shadow: 0 8px 18px rgba(95,75,219,0.3); }
    .auth-buttons { display: flex; gap: 8px; margin-left: 10px; flex-shrink: 0; }
    .btn-login, .btn-register { border: none; background: transparent; font-weight: 600; padding: 8px 18px; border-radius: 30px; cursor: pointer; font-size: 0.9rem; transition: .2s; display: flex; align-items: center; gap: 5px; }
    .btn-login { border: 2px solid #5f4bdb; color: #5f4bdb; background: white; }
    .btn-login:hover { background: #5f4bdb; color: white; }
    .btn-register { background: #ffb347; color: #2c2c3a; border: 2px solid #ffb347; font-weight: 700; }
    .user-menu { display: flex; align-items: center; gap: 10px; background: #f0ebff; padding: 5px 15px 5px 18px; border-radius: 40px; margin-left: 10px; flex-shrink: 0 !important; white-space: nowrap; }
    .logo { flex-shrink: 0; }
    .user-avatar { background: #5f4bdb; color: white; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; overflow: hidden; flex-shrink: 0; }
    .user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .page-content { flex: 1; background: rgba(255,255,255,0.55); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-radius: 48px; padding: 30px 25px; margin: 10px 0 25px; box-shadow: 0 25px 45px rgba(0,0,0,0.08); border: 1px solid rgba(255,255,255,0.8); overscroll-behavior-y: contain; }
    .page { display: none; }
    .page.active-page { display: block; }

    /* 创作页 · 全屏固定布局（禁止页面滚动） */
    body.create-page-active { overflow: hidden; height: 100vh; }
    body.create-page-active .app-wrapper {
      max-width: none; width: 100%; height: 100vh; min-height: 0;
      padding: 0 14px; overflow: hidden;
    }
    body.create-page-active .navbar { margin: 10px 0 4px; flex-shrink: 0; }
    body.create-page-active .page-content {
      flex: 1; min-height: 0; overflow: hidden;
      display: flex; flex-direction: column;
      margin: 0 0 4px; padding: 8px 14px 8px; border-radius: 28px;
    }
    body.create-page-active footer { display: none; }
    #createPage.active-page {
      display: flex; flex: 1; min-height: 0; overflow: hidden;
    }
    .create-layout {
      display: flex; flex: 1; min-height: 0; gap: 14px; width: 100%;
    }
    .create-sidebar {
      width: clamp(220px, 22vw, 300px); flex-shrink: 0;
      display: flex; flex-direction: column; min-height: 0;
      background: #fff; border-radius: 20px; border: 1px solid #ede9fe;
      box-shadow: 0 6px 24px rgba(95,75,219,.06); overflow: hidden;
    }
    .create-sidebar-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 16px; border-bottom: 1px solid #f0edf5; flex-shrink: 0;
      background: #faf8ff;
    }
    .create-sidebar-head h3 {
      margin: 0; font-size: .95rem; color: #5f4bdb; font-weight: 700;
      display: flex; align-items: center; gap: 8px;
    }
    .btn-new-chat {
      width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ddd6fe;
      background: #5f4bdb; color: #fff; cursor: pointer; font-size: .85rem;
      display: flex; align-items: center; justify-content: center;
    }
    .btn-new-chat:hover { background: #4c3bc4; }
    .create-sidebar-list {
      flex: 1; min-height: 0; overflow-y: auto; padding: 10px;
      display: flex; flex-direction: column; gap: 6px;
    }
    .create-session-empty {
      text-align: center; color: #aaa; font-size: .82rem; padding: 24px 12px; line-height: 1.6;
    }
    .create-session-item {
      display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
      width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px;
      border: 1px solid transparent; background: #faf8ff; cursor: pointer;
      transition: .15s;
    }
    .create-session-item:hover { border-color: #ddd6fe; background: #f3f0ff; }
    .create-session-item.active {
      border-color: #c4b5fd; background: #ede9fe;
      box-shadow: 0 4px 12px rgba(95,75,219,.12);
    }
    .create-session-item .csi-title {
      font-size: .88rem; font-weight: 600; color: #2b2844;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
    }
    .create-session-item .csi-meta { font-size: .72rem; color: #999; }
    .create-session-item.is-generating .csi-title { color: #6d28d9; }
    .create-session-item .csi-spin { font-size: .75rem; margin-left: 4px; color: #8b5cf6; }
    .create-session-item.from-other-device { background: #f8fafc; }
    .create-session-item.from-other-device .csi-meta { color: #7c8db5; }
    .btn-session-show-more {
      width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 12px;
      border: 1px dashed #c4b5fd; background: #faf8ff; color: #5f4bdb;
      font-size: .82rem; font-weight: 600; cursor: pointer; transition: .15s;
    }
    .btn-session-show-more:hover { background: #f3f0ff; border-color: #8b5cf6; }
    .btn-session-show-more.muted { color: #888; border-color: #ddd; background: #fff; }
    .btn-session-show-more.muted:hover { background: #fafafa; }
    .create-main {
      flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column;
    }
    .create-main-split {
      flex: 1; min-height: 0; display: flex; gap: 0; min-width: 0;
    }
    .create-main-split.preview-open .create-main-inner {
      flex: 0 0 50%; max-width: 50%; border-right: 1px solid #ede9fe;
    }
    .create-preview-pane {
      flex: 0 0 50%; max-width: 50%; display: none; flex-direction: column;
      background: #faf8ff; min-height: 0;
    }
    .create-main-split.preview-open .create-preview-pane { display: flex; }
    .create-preview-pane .cpp-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 16px; border-bottom: 1px solid #ede9fe; font-weight: 700; color: #5f4bdb;
      flex-shrink: 0;
    }
    .create-preview-pane .cpp-close {
      /* positioning only — visual via .ui-close-btn */
    }
    .create-preview-pane .cpp-body {
      flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto;
    }
    .create-preview-pane .cpp-body img {
      max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px;
      box-shadow: 0 8px 32px rgba(95,75,219,.15);
    }
    .create-main-inner { flex: 1; min-height: 0; display: flex; flex-direction: column; min-width: 0; }
    .create-session-item-wrap {
      display: flex; align-items: stretch; gap: 4px;
    }
    .create-session-item-wrap .create-session-item { flex: 1; min-width: 0; }
    .btn-session-rename, .btn-session-delete {
      flex-shrink: 0; width: 32px; border: none; background: transparent; color: #bbb;
      cursor: pointer; border-radius: 8px; font-size: .78rem;
    }
    .btn-session-rename:hover, .btn-session-delete:hover { color: #5f4bdb; background: #f3f0ff; }
    .composer-options {
      margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e8e2f5;
      display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
    }
    .composer-selects {
      display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; flex: 1; min-width: 0;
    }
    .composer-field {
      display: flex; align-items: center; gap: 6px; min-width: 0;
    }
    .composer-label {
      font-size: .72rem; color: #999; font-weight: 600; flex-shrink: 0; white-space: nowrap;
    }
    .composer-select {
      appearance: none; -webkit-appearance: none;
      min-width: 88px; max-width: 140px;
      padding: 6px 28px 6px 10px;
      border: 1px solid #ddd6fe; border-radius: 10px;
      background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235f4bdb' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 8px center;
      color: #2b2844; font-size: .8rem; font-weight: 600;
      cursor: pointer; transition: border-color .15s, box-shadow .15s;
    }
    .composer-select:hover { border-color: #c4b5fd; }
    .composer-select:focus {
      outline: none; border-color: #5f4bdb;
      box-shadow: 0 0 0 3px rgba(95,75,219,.12);
    }
    .composer-actions { flex-shrink: 0; }
    .gen-interrupted-banner {
      display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 8px;
      background: #fff8e6; border: 1px solid #ffe0a3; border-radius: 12px; font-size: .82rem; color: #8a6d00;
    }
    .btn-retry-gen {
      margin-left: auto; border: none; background: #ffb347; color: #2c2c3a;
      padding: 4px 12px; border-radius: 14px; cursor: pointer; font-weight: 600; font-size: .78rem;
    }
    .btn-dismiss-gen { /* visual via .ui-close-btn */ }
    .user-msg-images {
      display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
    }
    .user-msg-images img {
      width: 72px; height: 72px; object-fit: cover; border-radius: 10px; cursor: zoom-in;
      border: 1px solid #e0d6ff;
    }
    .form-hint { font-size: .78rem; color: #a193c9; margin: -6px 0 12px; }
    @media (max-width: 900px) {
      .create-main-split.preview-open { flex-direction: column; }
      .create-main-split.preview-open .create-main-inner,
      .create-main-split.preview-open .create-preview-pane {
        flex: 1 1 auto; max-width: 100%; max-height: 50%;
      }
    }
    @media (max-width: 768px) {
      .create-layout { flex-direction: column; gap: 10px; }
      .create-sidebar { width: 100%; max-height: 130px; }
      .create-sidebar-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
      .create-session-item { min-width: 140px; flex-shrink: 0; }
    }

    h2 { font-size: 2rem; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; color: #2b2844; }
    h3 { font-size: 1.5rem; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; color: #2b2844; }
    .card-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 20px;
      margin-top: 25px;
      justify-content: start;
    }
    @media (max-width: 1100px) {
      .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }
    @media (max-width: 800px) {
      .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 500px) {
      .card-grid { grid-template-columns: 1fr; }
    }
    .hot-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
    @media (max-width:768px){ .hot-grid-3{grid-template-columns:repeat(2,1fr);} }
    @media (max-width:500px){ .hot-grid-3{grid-template-columns:1fr;} }

    /* ============ 热门排行榜（Marketplace Leaderboard） ============ */
    .lb-wrap { margin-top: 10px; width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
    .lb-columns, .lb-board { width: 100%; max-width: 100%; min-width: 0; }
    .lb-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
    /* 胶囊 Tab 切换 */
    .lb-tabs { display: inline-flex; background: #f0ebff; border-radius: 40px; padding: 5px; gap: 4px; position: relative; }
    .lb-tab { border: none; background: transparent; cursor: pointer; font-weight: 700; font-size: .92rem; color: #5f4bdb; padding: 9px 22px; border-radius: 30px; transition: color .25s ease; position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
    .lb-tab.active { color: #fff; }
    /* 滑动的高亮胶囊 */
    .lb-tab-slider { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 30px; background: linear-gradient(135deg,#9b6dff,#5f4bdb); box-shadow: 0 6px 14px rgba(95,75,219,.32); transition: transform .32s cubic-bezier(.34,1.56,.64,1); z-index: 0; }
    .lb-tabs[data-active="new"] .lb-tab-slider { transform: translateX(100%); }
    .lb-refresh { font-size: .78rem; color: #a193c9; display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }

    /* 领奖台 Top3 */
    .lb-podium {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
      gap: 14px;
      align-items: end;
      margin-bottom: 18px;
      padding: 8px 0 0;
      width: 100%;
      max-width: 100%;
      min-width: 0;
    }
    .lb-podium-item {
      background: #fff;
      border-radius: 20px;
      padding: 14px 10px 16px;
      text-align: center;
      box-shadow: 0 8px 22px rgba(95,75,219,.08);
      cursor: pointer;
      transition: transform .2s ease, box-shadow .2s ease;
      border: 1.5px solid #ede9fe;
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
    }
    .lb-podium-item:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(95,75,219,.16); }
    .lb-podium-item.podium-1 {
      order: 2;
      padding-top: 18px;
      border-color: #ffd86b;
      background: linear-gradient(180deg,#fffdf5 0%,#fff 100%);
      box-shadow: 0 12px 28px rgba(255,184,71,.18);
    }
    .lb-podium-item.podium-2 { order: 1; margin-top: 18px; }
    .lb-podium-item.podium-3 { order: 3; margin-top: 28px; }
    .lb-podium-rank { font-size: 1.8rem; line-height: 1; margin-bottom: 8px; }
    .lb-podium-cover {
      width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 18px;
      background: linear-gradient(135deg,#f0ebff,#e0d6ff);
      display: flex; align-items: center; justify-content: center; font-size: 2rem; overflow: hidden;
    }
    .lb-podium-item.podium-1 .lb-podium-cover { width: 84px; height: 84px; }
    .lb-podium-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .lb-podium-name {
      font-weight: 700; font-size: .88rem; color: #2b2844; line-height: 1.45;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
      overflow: hidden; word-break: break-word; text-align: center;
    }
    .lb-podium-score { font-size: .72rem; color: #9a93b8; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* 4-10 名顺序列表 */
    .lb-list { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 100%; min-width: 0; }
    .lb-list--compact { margin-top: 4px; }
    @media (max-width: 640px) {
      .lb-podium { grid-template-columns: 1fr; }
      .lb-podium-item, .lb-podium-item.podium-1, .lb-podium-item.podium-2, .lb-podium-item.podium-3 {
        order: unset; margin-top: 0;
      }
      .lb-podium-item.podium-1 .lb-podium-cover { width: 72px; height: 72px; }
    }

    /* 单条榜单行 */
    .lb-row { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 16px; padding: 12px 16px; box-shadow: 0 4px 14px rgba(95,75,219,.06); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; border: 1px solid #f3f0ff; width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
    .lb-row:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(95,75,219,.12); }
    .lb-row--top { border-color: #e8e0ff; }
    .lb-row--1 { background: linear-gradient(90deg,#fffdf5,#fff); border-color: #ffe8a8; }
    .lb-row--2 { background: linear-gradient(90deg,#f8faff,#fff); }
    .lb-row--3 { background: linear-gradient(90deg,#fff9f3,#fff); border-color: #ffd9b0; }
    .lb-rank { flex: 0 0 36px; text-align: center; font-weight: 800; color: #b9b2d6; font-variant-numeric: tabular-nums; }
    .lb-rank .lb-medal { font-size: 1.45rem; line-height: 1; display: inline-block; }
    .lb-rank .lb-num { font-size: 1.05rem; color: #9a93b8; }
    .lb-cover { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; background: linear-gradient(135deg,#f0ebff,#e0d6ff); overflow: hidden; }
    .lb-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .lb-emoji { font-size: 1.5rem; }
    .lb-meta { flex: 1 1 auto; min-width: 0; }
    .lb-name { font-weight: 700; font-size: .95rem; color: #2b2844; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .lb-author { font-size: .75rem; color: #9a93b8; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .lb-score { flex: 0 0 auto; text-align: right; min-width: 64px; max-width: 96px; flex-shrink: 0; }
    .lb-score b { display: block; font-size: .92rem; color: #5f4bdb; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .lb-score b i { font-size: .78rem; margin-right: 2px; }
    .lb-score span { font-size: .68rem; color: #b9b2d6; }
    .lb-empty { text-align: center; color: #a193c9; padding: 40px 16px; background: #faf8ff; border-radius: 18px; border: 1px dashed #ddd6fe; }

    .interaction-bar { display: flex; gap: 10px; margin-top: 8px; }
    .interaction-btn {
      border: 1px solid #e8e0ff; background: #faf8ff; color: #888; border-radius: 999px;
      padding: 4px 12px; font-size: .78rem; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
      transition: .15s;
    }
    .interaction-btn:hover { border-color: #c4b5fd; color: #5f4bdb; background: #f3f0ff; }
    .interaction-btn.active { border-color: #ff6b8a; color: #ff4757; background: #fff0f3; }
    .shop-bundle-detail-actions { flex-wrap: wrap; gap: 10px; align-items: center; }
    .btn-shop-buy {
      border: none; background: linear-gradient(135deg,#ff6b6b,#ff8787); color: #fff;
      border-radius: 999px; padding: 6px 16px; font-size: .82rem; font-weight: 600;
      cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
      box-shadow: 0 4px 14px rgba(255,107,107,.28); transition: .15s;
    }
    .btn-shop-buy:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,107,107,.35); }
    .shop-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
    .shop-purchase-panel { max-width: 400px; width: 92vw; text-align: center; }
    .shop-purchase-work { margin: 0 0 8px; font-weight: 600; color: #2b2844; font-size: .95rem; }
    .shop-purchase-hint { margin: 0 0 16px; color: #666; font-size: .88rem; line-height: 1.55; }
    .shop-purchase-qr-wrap {
      width: 220px; height: 220px; margin: 0 auto 12px; padding: 10px;
      background: #faf8ff; border-radius: 16px; border: 1px solid #ede9fe;
      display: flex; align-items: center; justify-content: center;
    }
    .shop-purchase-qr { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
    .shop-purchase-wechat { margin: 0 0 8px; color: #5f4bdb; font-weight: 600; font-size: .9rem; }
    .shop-purchase-foot { margin: 0; color: #aaa; font-size: .78rem; line-height: 1.5; }
    .shop-preview-buy-row { margin-top: 16px; }

    /* 触底激励气泡卡片 */
    .lb-incentive { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 18px 22px; border-radius: 22px;
      background: linear-gradient(120deg,#fff6e9 0%,#fdeaff 55%,#eaf0ff 100%);
      border: 1.5px solid #ffe2bd; box-shadow: 0 10px 26px rgba(255,179,71,.16); animation: lb-pop .45s cubic-bezier(.34,1.56,.64,1); }
    @keyframes lb-pop { 0%{ transform: translateY(14px) scale(.96); opacity: 0; } 100%{ transform: translateY(0) scale(1); opacity: 1; } }
    .lb-incentive-emoji { flex: 0 0 auto; font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 3px 5px rgba(0,0,0,.12)); animation: lb-bob 2.4s ease-in-out infinite; }
    .lb-incentive-text { flex: 1 1 auto; min-width: 0; }
    .lb-incentive-text p { margin: 0 0 4px; font-size: .92rem; color: #5a4a3a; line-height: 1.5; }
    .lb-incentive-text b { color: #e8852b; }
    .lb-incentive-title { font-weight: 700; color: #2b2844 !important; }
    .lb-incentive .btn { margin-top: 6px; padding: 8px 20px; font-size: .85rem; }
    .lb-progress { margin-top: 8px; height: 9px; border-radius: 6px; background: #ffffffcc; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.08); }
    .lb-progress-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg,#ffd86b,#ff9a5a,#ff7eb3); background-size: 200% 100%; animation: lb-shine 3s linear infinite; transition: width .6s ease; }
    .feature-card { background: white; border-radius: 28px; padding: 25px 15px; text-align: center; box-shadow: 0 10px 20px rgba(0,0,0,0.05); transition: .2s; cursor: pointer; }
    .feature-card:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(95,75,219,0.15); }
    .feature-card i { font-size: 2.8rem; color: #5f4bdb; margin-bottom: 15px; }
    .btn { background: #5f4bdb; border: none; color: white; padding: 12px 24px; border-radius: 30px; font-weight: 600; cursor: pointer; transition: .2s; }
    .btn:hover { background: #4c3abf; transform: translateY(-2px); }
    .btn-outline { background: transparent; border: 2px solid #5f4bdb; color: #5f4bdb; }
    .btn-download { background: #2ed573; border: none; color: white; padding: 12px 28px; border-radius: 30px; font-weight: 600; cursor: pointer; transition: .2s; font-size: 1rem; display: inline-flex; align-items: center; gap: 8px; }
    .btn-download:hover { background: #26af5a; transform: scale(1.05); }
    .ip-card, .category-card, .shop-card, .activity-card { background: white; border-radius: 28px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.05); cursor: pointer; transition: .3s; position: relative; }
    .ip-card:hover, .category-card:hover, .shop-card:hover, .activity-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(95,75,219,0.2); }
    .ip-image, .category-image, .shop-image, .activity-image { height: 200px; display: flex; align-items: center; justify-content: center; font-size: 4rem; }
    .ip-info, .category-info, .shop-info, .activity-info { padding: 18px; }
    .ip-info h4, .category-info h4, .shop-info h4, .activity-info h4 { font-size: 1.1rem; margin-bottom: 5px; color: #2b2844; }
    .ip-info p, .category-info p, .shop-info p, .activity-info p { color: #888; font-size: 0.9rem; margin-bottom: 10px; }
    .activity-card-cover { background: linear-gradient(135deg,#ffe0e0,#fff0f0); overflow: hidden; }
    .activity-card-deadline { color: #ff6b6b; font-size: 0.85rem; margin-bottom: 8px; }
    .activity-card .activity-card-btn { width: 100%; margin-top: 10px; pointer-events: none; }
    .activity-image .activity-cover-img { width:100%; height:100%; object-fit:cover; display:block; }
    .activity-main-image.is-cover { padding: 0; overflow: hidden; }
    .activity-main-image .activity-main-cover { width:100%; height:100%; object-fit:cover; border-radius:24px; display:block; }
    .activity-buy-row { display:flex; align-items:center; gap:15px; margin-top:15px; flex-wrap:wrap; }
    .course-section-title { margin-bottom: 20px; }
    .author-link { color: #5f4bdb; cursor: pointer; font-weight: 600; transition: .2s; }
    .author-link:hover { color: #ffb347; text-decoration: underline; }
    .interaction-bar { display: flex; gap: 15px; padding-top: 10px; border-top: 1px solid #f0edf5; }
    .interaction-btn { display: flex; align-items: center; gap: 5px; background: none; border: none; cursor: pointer; font-size: 0.9rem; color: #888; transition: .2s; padding: 5px 10px; border-radius: 20px; }
    .interaction-btn:hover { background: #faf8ff; color: #5f4bdb; }
    .interaction-btn.liked, .interaction-btn.liked i { color: #ff6b6b; }
    .interaction-btn.collected, .interaction-btn.collected i { color: #ffb347; }
    .ip-detail-container, .activity-detail-container { animation: fadeIn .4s ease; }
    .ip-main-section, .activity-main-section { display: flex; gap: 30px; flex-wrap: wrap; margin-bottom: 30px; background: white; border-radius: 28px; padding: 25px; }
    .ip-main-image, .activity-main-image { width: 280px; height: 280px; border-radius: 24px; display: flex; align-items: center; justify-content: center; font-size: 6rem; background: linear-gradient(135deg,#f0ebff,#e0d6ff); flex-shrink: 0; }
    .ip-main-info, .activity-main-info { flex: 1; min-width: 260px; }
    .ip-main-info h2, .activity-main-info h2 { font-size: 2.2rem; margin-bottom: 10px; }
    .ip-main-info p, .activity-main-info p { font-size: 1.1rem; line-height: 1.6; color: #555; margin-bottom: 10px; }
    .ip-profile-panel { display: flex; flex-direction: column; gap: 14px; }
    .ip-profile-name { font-size: 2rem; margin: 0; color: #2b2844; line-height: 1.25; }
    .ip-profile-meta { display: flex; flex-wrap: wrap; gap: 8px; }
    .ip-meta-chip {
      display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
      background: #f3f0ff; color: #5f4bdb; font-size: .85rem; font-weight: 600;
    }
    .ip-meta-chip i { font-size: .78rem; opacity: .85; }
    .ip-profile-fields { margin: 0; display: flex; flex-direction: column; gap: 12px; }
    .ipf-row { display: grid; grid-template-columns: 108px 1fr; gap: 10px 14px; align-items: start; }
    .ipf-row dt {
      margin: 0; font-size: .82rem; font-weight: 700; color: #8b5cf6; letter-spacing: .02em;
      padding-top: 2px;
    }
    .ipf-row dd { margin: 0; font-size: .98rem; line-height: 1.65; color: #444; }
    .ipf-row-block dd { white-space: pre-wrap; }
    .ipf-quote { font-style: italic; color: #5f4bdb; }
    .ipf-empty { color: #bbb; font-size: .92rem; }
    .ipf-empty .ipf-add-hint {
      color: #5f7cff;
      cursor: pointer;
      border: none;
      background: none;
      padding: 0;
      margin-left: 4px;
      font-size: inherit;
      font-family: inherit;
    }
    .ipf-empty .ipf-add-hint:hover { text-decoration: underline; }
    .ip-profile-stats { margin: 4px 0 0; font-size: .88rem; color: #999; }
    @media (max-width: 720px) {
      .ip-main-image, .activity-main-image { width: 100%; height: auto; aspect-ratio: 1; }
      .ipf-row { grid-template-columns: 1fr; gap: 4px; }
    }
    .section-tabs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 25px; }
    .section-tab { padding: 12px 24px; background: white; border: 2px solid #e0d6ff; border-radius: 30px; cursor: pointer; font-weight: 600; transition: .2s; display: flex; align-items: center; gap: 8px; }
    .section-tab:hover { border-color: #5f4bdb; background: #faf8ff; }
    .section-tab.active-tab { background: #5f4bdb; color: white; border-color: #5f4bdb; }
    .section-content { background: white; border-radius: 24px; padding: 25px; min-height: 200px; }
    .media-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
    @media (max-width:900px){ .media-grid{grid-template-columns:repeat(2,1fr);} }
    @media (max-width:500px){ .media-grid{grid-template-columns:1fr;} }
    .media-card { background: #faf8ff; border-radius: 20px; overflow: hidden; cursor: pointer; transition: .3s; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
    .media-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(95,75,219,0.2); }
    .media-thumbnail { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: linear-gradient(135deg,#f0ebff,#e0d6ff); overflow: hidden; }
    .media-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .media-thumbnail.illustration-thumb { background: linear-gradient(135deg,#f0ebff,#e0d6ff); }
    .media-thumbnail.comic-thumb { background: linear-gradient(135deg,#e0f0ff,#f0f8ff); }
    .media-thumbnail.music-thumb { background: linear-gradient(135deg,#f0ffe0,#f8fff0); }
    .media-thumbnail.video-thumb { background: linear-gradient(135deg,#ffe0ff,#fff0ff); }
    .ip-main-image.has-cover img, .category-image.has-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .ip-main-image.has-cover, .category-image.has-cover { overflow: hidden; padding: 0; font-size: 0; }
    .works-ip-card { position: relative; }
    .works-ip-delete {
      position: absolute; top: 10px; right: 10px; z-index: 2;
      width: 32px; height: 32px; border-radius: 50%; border: none;
      background: rgba(255,255,255,.92); color: #999; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 2px 8px rgba(0,0,0,.1); transition: color .2s, background .2s;
    }
    .works-ip-delete:hover { color: #e74c3c; background: #fff5f5; }
    .fullscreen-image img, .fullscreen-image video {
      max-width: 100%; max-height: 60vh; border-radius: 16px; object-fit: contain;
    }
    .fullscreen-text-body {
      text-align: left; background: #faf8ff; border-radius: 16px; padding: 20px;
      margin: 16px 0; line-height: 1.7; color: #444; max-height: 40vh; overflow-y: auto;
      white-space: pre-wrap; word-break: break-word;
    }
    .works-detail-actions { margin-top: 20px; }
    .btn-work-delete-inline {
      background: #fff; border: 1px solid #fecaca; color: #e74c3c;
      padding: 10px 18px; border-radius: 24px; font-size: .88rem; cursor: pointer;
    }
    .btn-work-delete-inline:hover { background: #fff5f5; }
    .works-shop-badge {
      display: inline-block; background: #e3f9e9; color: #2ed573;
      font-size: .72rem; padding: 2px 8px; border-radius: 10px; margin-left: 6px;
    }
    .works-card-actions, .works-detail-actions {
      display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px;
    }
    .btn-shop-action {
      background: linear-gradient(135deg,#5f4bdb,#8b5cf6); color: #fff; border: none;
      padding: 6px 14px; border-radius: 18px; font-size: .78rem; cursor: pointer;
    }
    .btn-shop-action:hover { opacity: .92; }
    .btn-shop-action.offline {
      background: #fff; color: #888; border: 1px solid #ddd;
    }
    .btn-shop-action.offline:hover { background: #f5f5f5; }
    .media-card { position: relative; }
    .media-card-shop {
      position: absolute; top: 8px; right: 8px; z-index: 2;
      padding: 4px 10px; border-radius: 14px; border: none; font-size: .72rem; cursor: pointer;
      background: rgba(95,75,219,.92); color: #fff;
    }
    .media-card-shop.offline { background: rgba(255,255,255,.92); color: #666; border: 1px solid #ddd; }
    .media-card-shop-badge {
      position: absolute; top: 8px; left: 8px; z-index: 2;
      background: rgba(46,213,115,.92); color: #fff; font-size: .68rem;
      padding: 3px 8px; border-radius: 10px;
    }
    .media-info { padding: 12px; text-align: center; }
    .media-info h5 { font-size: 0.95rem; color: #2b2844; margin-bottom: 5px; }
    .content-display-page { animation: fadeIn .4s ease; }
    .content-display-header { background: white; border-radius: 28px; padding: 25px; margin-bottom: 25px; text-align: center; }
    .content-display-header .display-icon { font-size: 5rem; margin-bottom: 15px; }
    .profile-section { background: white; border-radius: 28px; padding: 30px; margin-bottom: 25px; display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
    .profile-avatar-wrap { position: relative; flex-shrink: 0; }
    .profile-avatar { width: 120px; height: 120px; border-radius: 50%; background: linear-gradient(135deg,#c4b5fd,#8b5cf6); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: white; flex-shrink: 0; overflow: hidden; cursor: pointer; position: relative; }
    .profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .profile-avatar-edit {
      position: absolute; right: 0; bottom: 0; width: 36px; height: 36px; border-radius: 50%;
      border: 2px solid #fff; background: #5f4bdb; color: #fff; cursor: pointer;
      display: flex; align-items: center; justify-content: center; font-size: .85rem;
      box-shadow: 0 4px 12px rgba(95,75,219,.25);
    }
    .profile-avatar-edit:hover { background: #4c3bd4; }
    .settings-block { margin: 18px 0 22px; padding-bottom: 18px; border-bottom: 1px solid #ede9fe; }
    .settings-block:last-of-type { border-bottom: none; }
    .settings-block h4 { margin: 0 0 8px; font-size: .95rem; color: #2b2844; display: flex; align-items: center; gap: 8px; }
    .settings-hint { margin: 0 0 12px; color: #888; font-size: .82rem; }
    .settings-form { display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
    .settings-form input {
      width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #e0d6ff;
      font-size: .92rem; box-sizing: border-box;
    }
    .profile-info { flex: 1; min-width: 220px; }
    .profile-info h3 { font-size: 1.8rem; margin-bottom: 8px; }
    .profile-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 8px; }
    .profile-name-row h3 { margin-bottom: 0; }
    .btn-edit-inline { border: none; background: #f0ebff; color: #5f4bdb; font-size: .82rem; font-weight: 600; padding: 6px 14px; border-radius: 20px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: .2s; }
    .btn-edit-inline:hover { background: #e4dbff; transform: translateY(-1px); }
    .profile-settings-btn { padding: 10px 20px; align-self: flex-start; }
    .profile-stats-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 15px; flex-wrap: wrap; }
    .profile-stats { display: flex; gap: 30px; flex-wrap: wrap; }
    .profile-token-block { text-align: right; margin-left: auto; flex-shrink: 0; }
    .profile-token-block .stat-value { font-size: 1.55rem; }
    .btn-token-recharge-mini {
      margin-top: 4px; border: none; background: #fff6e9; color: #e8852b; font-size: .72rem; font-weight: 600;
      padding: 3px 10px; border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: .2s;
    }
    .btn-token-recharge-mini:hover { background: #ffeacc; transform: translateY(-1px); }
    .center-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
    @media (max-width: 900px) { .center-quick-grid { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 520px) { .center-quick-grid { grid-template-columns: 1fr; } }
    .center-panel { margin-bottom: 24px; animation: fadeIn .35s ease; }
    .settings-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

    /* 对话 · 短篇故事卡片 */
    .story-result-card {
      background: linear-gradient(135deg,#faf8ff,#fff);
      border: 1.5px solid #e8e0ff; border-radius: 18px;
      padding: 16px 18px; margin-top: 6px; max-width: 520px;
    }
    .story-result-card .story-label { font-weight: 700; color: #2b2844; }
    .story-ip-name { font-size: 1.05rem; color: #2b2844; margin-bottom: 12px; line-height: 1.5; }
    .story-section-title { font-size: 1rem; color: #2b2844; margin-bottom: 10px; }
    .story-word-count { font-weight: 600; color: #5f4bdb; font-size: .95rem; }
    .story-body { font-size: .92rem; color: #555; line-height: 1.85; text-align: justify; }

    /* 对话 · 分镜脚本表格 */
    .script-result-card {
      background: linear-gradient(135deg,#faf8ff,#fff); border: 1.5px solid #e8e0ff;
      border-radius: 20px; padding: 14px 12px; margin-top: 8px; max-width: 100%; overflow: hidden;
    }
    .script-result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
    .script-result-head .script-quote-btn { margin-left: auto; flex-shrink: 0; }
    .script-result-title { margin: 0; font-size: 1rem; color: #2b2844; }
    .script-total { font-size: .78rem; color: #8b5cf6; font-weight: 600; }
    .script-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid #ede9fe; }
    .script-table { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 640px; background: #fff; }
    .script-table th {
      background: #f3f0ff; color: #5f4bdb; font-weight: 700; text-align: left;
      padding: 10px 10px; border-bottom: 1px solid #e8e0ff; white-space: nowrap;
    }
    .script-table td {
      padding: 10px 10px; border-bottom: 1px solid #f3f0ff; color: #444;
      vertical-align: top; line-height: 1.55;
    }
    .script-table tbody tr:last-child td { border-bottom: none; }
    .script-col-no, .script-col-dur { white-space: nowrap; width: 56px; color: #5f4bdb; font-weight: 600; }
    .script-col-scene { min-width: 140px; }
    .script-col-dialogue { min-width: 120px; }
    .script-col-bgm { min-width: 100px; color: #666; }
    .script-notes { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e8e0ff; }
    .script-notes-title { font-size: .78rem; font-weight: 700; color: #8b5cf6; margin-bottom: 6px; }
    .script-notes-body { font-size: .88rem; line-height: 1.65; color: #555; }
    .script-fallback, .script-empty { font-size: .9rem; line-height: 1.65; color: #555; }
    .fullscreen-script-body .script-result-card { max-width: none; border: none; background: transparent; padding: 0; }

    /* 对话 · 音乐卡片 */
    .music-result-card { background: linear-gradient(135deg,#faf8ff,#fff); border: 1.5px solid #e8e0ff; border-radius: 20px; overflow: hidden; margin-top: 8px; max-width: 420px; }
    .music-card-head { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
    .music-cover { width: 64px; height: 64px; border-radius: 14px; background: linear-gradient(135deg,#c4b5fd,#8b5cf6); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; flex-shrink: 0; overflow: hidden; }
    .music-cover img { width: 100%; height: 100%; object-fit: cover; }
    .music-meta { flex: 1; min-width: 0; }
    .music-meta h4 { font-size: 1rem; color: #2b2844; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .music-meta p { margin: 0; font-size: .78rem; color: #888; }
    .music-play-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
    .music-play-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: linear-gradient(135deg,#9b6dff,#5f4bdb); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; box-shadow: 0 6px 14px rgba(95,75,219,.28); transition: .2s; }
    .music-play-btn:hover { transform: scale(1.05); }
    .music-play-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
    .music-duration { font-size: .72rem; color: #9a93b8; font-variant-numeric: tabular-nums; }
    .music-lyrics-preview { padding: 0 14px 12px; font-size: .85rem; color: #555; line-height: 1.65; white-space: pre-wrap; max-height: 140px; overflow: hidden; }
    .music-card-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 12px; border-top: 1px solid #f0ebff; }
    .music-card-actions { display: flex; gap: 8px; }
    .music-card-actions button { border: none; background: #f0ebff; color: #5f4bdb; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; transition: .2s; }
    .music-card-actions button:hover { background: #e4dbff; }
    .music-ai-tag { font-size: .72rem; color: #a193c9; background: #faf8ff; padding: 4px 10px; border-radius: 12px; }
    .music-audio-note { padding: 0 14px 10px; font-size: .78rem; color: #a193c9; }
    .music-result-card audio { display: none; }
    .stat-item { text-align: center; }
    .stat-value { font-size: 1.8rem; font-weight: 700; color: #5f4bdb; }
    .stat-label { color: #888; font-size: 0.9rem; }
    .certificate-card { background: white; border-radius: 24px; padding: 25px; margin-bottom: 15px; display: flex; gap: 20px; align-items: center; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: .2s; cursor: pointer; }
    .certificate-card:hover { box-shadow: 0 10px 25px rgba(95,75,219,0.15); transform: translateY(-3px); }
    .certificate-icon { width: 80px; height: 100px; background: linear-gradient(135deg,#fff9e0,#ffe0b2); border: 3px solid #ffb347; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; flex-shrink: 0; }
    .certificate-info { flex: 1; }
    .certificate-preview { background: linear-gradient(135deg,#fff9e0,#ffe0b2); border: 4px double #ffb347; border-radius: 20px; padding: 40px; text-align: center; position: relative; max-width: 600px; margin: 0 auto; }
    .certificate-preview h2 { font-size: 2.5rem; color: #8b6914; margin-bottom: 10px; }
    .certificate-preview .seal { width: 80px; height: 80px; border-radius: 50%; background: rgba(255,179,71,0.3); border: 3px solid #ffb347; display: flex; align-items: center; justify-content: center; position: absolute; bottom: 20px; right: 30px; font-size: 1.2rem; font-weight: 700; color: #8b6914; }
    .report-card { background: white; border-radius: 24px; padding: 25px; margin-bottom: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: .2s; }
    .report-card:hover { box-shadow: 0 10px 25px rgba(95,75,219,0.15); }
    .report-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
    .report-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 15px; margin: 20px 0; }
    .report-stat { background: #faf8ff; padding: 20px; border-radius: 16px; text-align: center; }
    .report-stat i { font-size: 2rem; color: #5f4bdb; margin-bottom: 10px; }
    .progress-bar { width: 100%; height: 10px; background: #e0d6ff; border-radius: 5px; overflow: hidden; margin-top: 8px; }
    .progress-fill { height: 100%; background: linear-gradient(90deg,#5f4bdb,#ffb347); border-radius: 5px; }
    .course-section { background: white; border-radius: 24px; padding: 30px; margin-bottom: 25px; }
    .course-item { background: #faf8ff; border-radius: 20px; padding: 20px; margin-bottom: 15px; border-left: 4px solid #5f4bdb; transition: .2s; }
    .course-item:hover { background: #f0ebff; transform: translateX(5px); }
    .course-item h4 { font-size: 1.2rem; color: #2b2844; margin-bottom: 8px; }
    .course-item p { color: #666; line-height: 1.6; }
    .course-meta { display: flex; gap: 20px; margin-top: 10px; font-size: 0.9rem; color: #888; }
    .purchase-area { text-align: center; padding: 30px; background: linear-gradient(135deg,#fff0f0,#ffe0e0); border-radius: 24px; margin-top: 25px; }
    .deadline-text { color: #ff6b6b; font-weight: 600; font-size: 1.1rem; margin-top: 15px; }
    .fullscreen-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); z-index: 2000; align-items: center; justify-content: center; }
    .fullscreen-modal.active { display: flex; }
    .fullscreen-content { background: white; border-radius: 30px; padding: 40px; max-width: 800px; width: 90%; max-height: 85vh; overflow-y: auto; position: relative; text-align: center; }
    .fullscreen-close { position: absolute; top: 16px; right: 16px; z-index: 5; }
    .fullscreen-image { font-size: 8rem; margin: 20px 0; }
    .fullscreen-title { font-size: 2rem; font-weight: 700; color: #2b2844; margin-bottom: 10px; }
    .fullscreen-desc { font-size: 1.2rem; color: #666; line-height: 1.8; margin: 20px 0; }
    .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(6px); align-items: center; justify-content: center; z-index: 1000; }
    .modal.active-modal { display: flex; }
    .modal-content { background: white; border-radius: 40px; padding: 35px 30px; max-width: 400px; width: 90%; box-shadow: 0 30px 50px rgba(0,0,0,0.3); }
    .modal-content.login-modal { max-width: 420px; }
    .captcha-wrap { min-height: 200px; margin: 8px 0 12px; display: flex; align-items: center; justify-content: center; background: #faf8ff; border-radius: 16px; border: 1px solid #e8e2f5; overflow: hidden; }
    .captcha-wrap.captcha-loading { color: #888; font-size: .9rem; }
    .close-modal { float: right; margin: -4px -4px 8px 8px; }
    input, select { width: 100%; padding: 14px; margin: 12px 0; border-radius: 30px; border: 1px solid #ddd; background: #f8f5ff; font-size: 1rem; }
    footer { text-align: center; color: #7b78a2; margin: 15px 0; font-size: 0.9rem; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

    /* ===== 公开课样式 ===== */
    #liveSection { text-align: left; }
    .live-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 16px;
      margin-top: 16px;
      width: 100%;
      justify-content: start;
      justify-items: stretch;
      align-items: start;
    }
    .live-grid-empty { grid-column: 1 / -1; text-align: center; }
    .live-card {
      background: white; border-radius: 16px; overflow: hidden;
      box-shadow: 0 6px 16px rgba(0,0,0,0.06); cursor: pointer; transition: .25s;
      min-width: 0; width: 100%;
    }
    .live-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(95,75,219,0.18); }
    .live-cover {
      aspect-ratio: 4 / 3; height: auto; font-size: 2.5rem;
      display: flex; align-items: center; justify-content: center;
      background: linear-gradient(135deg,#e0d6ff,#c4b5fd); position: relative; overflow: hidden;
    }
    .live-cover.has-image img { width:100%; height:100%; object-fit:cover; display:block; position:absolute; inset:0; }
    .live-douyin-tag {
      position:absolute; right:8px; bottom:8px; background:rgba(0,0,0,.55); color:#fff;
      font-size:.65rem; padding:3px 8px; border-radius:12px; display:flex; align-items:center; gap:4px;
    }
    .live-card-desc {
      color:#666; font-size:.78rem; line-height:1.5; margin:4px 0 8px; min-height:2.4em;
      display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
    }
    .live-card-foot { display:flex; justify-content:flex-start; align-items:center; }
    .live-open-hint { color:#5f4bdb; font-size:.72rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .live-badge {
      position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 14px;
      font-size: 0.68rem; font-weight: 700; color: white;
    }
    .badge-live { background: #ff4757; animation: pulse 1.5s infinite; }
    .badge-upcoming { background: #ffb347; }
    .badge-replay { background: #747d8c; }
    @keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.6;} }
    .live-card-info { padding: 12px; text-align: left; }
    .live-card-info h4 {
      color: #2b2844; margin-bottom: 4px; font-size: .92rem; line-height: 1.35;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .live-card-info .teacher { color: #5f4bdb; font-size: 0.82rem; font-weight: 600; }
    .live-card-info .viewers { color: #888; font-size: 0.78rem; margin-top: 4px; }
    @media (max-width: 1280px) {
      .live-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    }
    @media (max-width: 1024px) {
      .live-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }
    @media (max-width: 720px) {
      .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 420px) {
      .live-grid { grid-template-columns: 1fr; }
    }
    .live-room { display: flex; gap: 20px; flex-wrap: wrap; }
    .live-stage { flex: 2; min-width: 320px; }
    .live-player { background: #1a1a2e; border-radius: 24px; aspect-ratio: 16/9; display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; position: relative; overflow: hidden; }
    .live-player .big-emoji { font-size: 5rem; margin-bottom: 10px; }
    .live-player video { width: 100%; height: 100%; object-fit: cover; }
    .live-meta-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; background: white; border-radius: 20px; padding: 15px 20px; flex-wrap: wrap; gap: 10px; }
    .live-chat { flex: 1; min-width: 280px; background: white; border-radius: 24px; display: flex; flex-direction: column; height: 480px; }
    .live-chat-header { padding: 16px 20px; border-bottom: 1px solid #f0edf5; font-weight: 700; color: #2b2844; display: flex; align-items: center; gap: 8px; }
    .live-chat-body { flex: 1; overflow-y: auto; padding: 15px 20px; display: flex; flex-direction: column; gap: 12px; }
    .chat-msg { font-size: 0.95rem; line-height: 1.4; }
    .chat-msg .who { color: #5f4bdb; font-weight: 700; margin-right: 6px; }
    .chat-msg.system { color: #aaa; font-size: 0.85rem; text-align: center; }
    .chat-msg.blocked { color: #ff4757; font-size: 0.85rem; }
    .live-chat-input { display: flex; gap: 10px; padding: 15px; border-top: 1px solid #f0edf5; }
    .live-chat-input input { margin: 0; border-radius: 30px; }
    .live-chat-input button { background: #5f4bdb; color: white; border: none; border-radius: 30px; padding: 0 20px; cursor: pointer; font-weight: 600; }

    .ai-msg { display:flex; gap:12px; align-items:flex-start; }
    .ai-msg .msg-body { position:relative; max-width:80%; min-width:0; }
    .ai-msg .bubble { background:#fff; border:1px solid #ede9fe; padding:16px 20px; border-radius:22px; line-height:1.6; word-break:break-word; }
    .ai-msg.user { flex-direction: row-reverse; }
    .ai-msg.user .bubble { background:#5f4bdb; color:#fff; border:none; }
    .ai-msg.user .msg-actions button { background:rgba(255,255,255,.15); border-color:rgba(255,255,255,.35); color:#fff; }
    .ai-msg.user .msg-actions button:hover { background:rgba(255,255,255,.28); border-color:#fff; }
    .ai-msg:hover .msg-actions { opacity:1; }
    #createPage .msg-actions { opacity:1; }
    .msg-actions {
      display:flex; gap:8px; margin-top:8px; opacity:0; transition:opacity .15s;
    }
    .msg-actions .msg-quote-btn {
      background:#5f4bdb; border-color:#5f4bdb; color:#fff; font-weight:600;
    }
    .msg-actions .msg-quote-btn:hover { background:#4c3bc4; border-color:#4c3bc4; }
    .ai-msg.user .msg-actions .msg-quote-btn {
      background:rgba(255,255,255,.22); border-color:rgba(255,255,255,.5); color:#fff;
    }
    .ai-msg.user .msg-actions .msg-quote-btn:hover {
      background:rgba(255,255,255,.35); border-color:#fff;
    }
    .ai-msg.user .msg-actions { justify-content:flex-end; }
    .msg-actions button {
      padding:4px 12px; font-size:.78rem; border-radius:16px;
      border:1px solid #ddd6fe; background:#faf8ff; color:#5f4bdb; cursor:pointer;
    }
    .msg-actions button:hover { background:#ede9fe; border-color:#c4b5fd; }
    .msg-actions button.copied { color:#2ed573; border-color:#2ed573; }
    .quote-block {
      font-size:.82rem; padding:8px 12px; margin-bottom:10px;
      border-left:3px solid #8b5cf6; background:rgba(139,92,246,.08);
      border-radius:0 10px 10px 0; color:#666; max-height:120px; overflow:hidden;
    }
    .ai-msg.user .quote-block { background:rgba(255,255,255,.15); border-left-color:#fff; color:rgba(255,255,255,.92); }
    .quote-block strong { color:#5f4bdb; font-size:.75rem; display:block; margin-bottom:4px; }
    .ai-msg.user .quote-block strong { color:#fff; }
    .quote-preview {
      display:none; margin-bottom:12px; padding:10px 36px 10px 14px;
      background:#f3f0ff; border:1px solid #ddd6fe; border-radius:14px;
      font-size:.85rem; position:relative;
    }
    .quote-preview.show { display:block; }
    .quote-preview .qp-title { color:#5f4bdb; font-weight:600; margin-bottom:4px; font-size:.8rem; }
    .quote-preview .qp-body { display:flex; gap:10px; align-items:flex-start; flex-direction:column; }
    .quote-preview .qp-text { color:#666; max-height:48px; overflow:hidden; white-space:pre-wrap; line-height:1.4; width:100%; }
    .qp-thumbs-grid {
      display:flex; flex-wrap:wrap; gap:8px; width:100%;
    }
    .qp-thumb-item {
      position:relative; width:52px; height:52px; border-radius:10px; overflow:hidden; background:#e8e2f5; flex-shrink:0;
    }
    .qp-thumb-item img { width:100%; height:100%; object-fit:cover; display:block; }
    .qp-thumb-item .qp-remove-btn {
      position:absolute; right:2px; top:2px;
    }
    .quote-block .quote-thumbs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px; }
    .quote-block .quote-thumb { width:48px; height:48px; border-radius:8px; object-fit:cover; display:block; margin-bottom:0; }
    .quote-block .quote-thumb { width:48px; height:48px; border-radius:8px; object-fit:cover; display:block; margin-bottom:6px; }
    .quote-block .quote-text-only { display:block; }

    /* 创作对话面板 */
    .create-chat-panel {
      background:#fff; border-radius:24px; box-shadow:0 8px 30px rgba(0,0,0,.06);
      overflow:hidden; display:flex; flex-direction:column;
      position:relative; flex:1; min-height:0; height:auto !important;
    }
    .create-chat-panel.size-compact { height:auto !important; }
    .create-chat-panel.size-normal { height:auto !important; }
    .create-chat-panel.size-expanded { height:auto !important; }
    .create-chat-panel.is-fullscreen {
      position:fixed; inset:0; z-index:8600; width:100%; height:100% !important;
      max-height:100%; border-radius:0; margin:0; box-shadow:none;
    }
    body.chat-fullscreen-active { overflow:hidden; }
    .create-chat-panel.is-fullscreen .size-only-btn { display:none; }
    .create-chat-panel.is-fullscreen .exit-fullscreen-btn { display:inline-flex; }
    .create-chat-panel.is-fullscreen .create-chat-messages { padding:28px 32px; }
    .create-chat-panel.is-fullscreen .create-chat-input-area { padding:18px 32px 20px; }
    .create-chat-panel.is-fullscreen .create-mode-bar { padding:16px 32px; }
    .exit-fullscreen-btn {
      display:none; align-items:center; gap:6px; height:32px; padding:0 14px;
      border-radius:16px; border:1px solid #ddd6fe; background:#5f4bdb; color:#fff;
      cursor:pointer; font-size:.82rem; font-weight:600; white-space:nowrap;
    }
    .exit-fullscreen-btn:hover { background:#4c3bc4; }
    .create-chat-float-exit {
      display:none; position:fixed; right:24px; bottom:24px; z-index:8601;
      align-items:center; gap:8px; padding:12px 20px; border-radius:30px;
      border:none; background:#5f4bdb; color:#fff; cursor:pointer;
      font-size:.92rem; font-weight:600; box-shadow:0 8px 28px rgba(95,75,219,.35);
      transition:transform .2s, box-shadow .2s;
    }
    .create-chat-float-exit:hover { transform:translateY(-2px); box-shadow:0 12px 32px rgba(95,75,219,.45); }
    body.chat-fullscreen-active .create-chat-float-exit { display:inline-flex; }
    .create-chat-toolbar {
      display:flex; justify-content:space-between; align-items:center;
      padding:12px 68px 12px 20px; background:#faf8ff; border-bottom:1px solid #f0edf5;
      font-size:.9rem; color:#5f4bdb; font-weight:600; flex-shrink:0;
    }
    .create-chat-toolbar-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
    .create-teacher-access-btn {
      padding:6px 12px; border-radius:16px; border:1px solid #fcd34d;
      background:#fffbeb; color:#b45309; font-size:.72rem; font-weight:600;
      cursor:pointer; display:inline-flex; align-items:center; gap:5px;
    }
    .create-teacher-access-btn:hover { background:#fef3c7; border-color:#f59e0b; }
    .create-teacher-access-btn.is-authorized {
      border-color:#86efac; background:#ecfdf5; color:#047857;
    }
    .create-teacher-access-btn.is-authorized:hover { background:#d1fae5; border-color:#34d399; }
    .create-session-id-btn {
      padding:6px 12px; border-radius:16px; border:1px dashed #c4b5fd;
      background:#fff; color:#6d28d9; font-size:.72rem; font-weight:600;
      cursor:pointer; display:inline-flex; align-items:center; gap:5px; max-width:220px;
    }
    .create-session-id-btn:hover { background:#f5f3ff; border-color:#8b5cf6; }
    .create-session-id-btn #sessionIdLabel { font-family: ui-monospace, monospace; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .btn-share-chat {
      padding:6px 14px; border-radius:16px; border:1px solid #ddd6fe;
      background:#fff; color:#5f4bdb; font-size:.78rem; font-weight:600;
      cursor:pointer; display:inline-flex; align-items:center; gap:6px;
    }
    .btn-share-chat:hover:not(:disabled) { background:#ede9fe; }
    .btn-share-chat:disabled { opacity:.45; cursor:not-allowed; }
    .share-view-banner {
      display:flex; align-items:center; justify-content:space-between; gap:12px;
      padding:10px 20px; background:linear-gradient(90deg,#f3f0ff,#faf8ff);
      border-bottom:1px solid #ede9fe; flex-shrink:0; flex-wrap:wrap;
    }
    .share-view-banner-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
    .share-view-banner-text strong { color:#2b2844; font-size:.9rem; }
    .share-view-banner-text span { color:#888; font-size:.78rem; }
    .btn-share-start-own {
      padding:8px 16px; border-radius:20px; border:none; background:#5f4bdb;
      color:#fff; font-size:.82rem; font-weight:600; cursor:pointer; flex-shrink:0;
    }
    .btn-share-start-own:hover { background:#4c3bc4; }
    #createPage.share-view .create-sidebar { display:none; }
    #createPage.share-view .create-chat-input-area,
    #createPage.share-view .composer-options,
    #createPage.share-view .btn-share-chat,
    #createPage.share-view #tokenFloatBall { display:none !important; }
    .share-chat-panel { max-width:520px; }
    .share-chat-hint { color:#888; font-size:.88rem; margin:0 0 16px; line-height:1.5; }
    .share-link-row { display:flex; gap:10px; margin-bottom:12px; }
    .share-link-input {
      flex:1; min-width:0; padding:10px 14px; border:1px solid #ddd6fe;
      border-radius:12px; background:#faf8ff; font-size:.85rem; color:#444;
    }
    .btn-share-copy {
      padding:10px 18px; border-radius:12px; border:none; background:#5f4bdb;
      color:#fff; font-weight:600; cursor:pointer; white-space:nowrap; font-size:.85rem;
    }
    .btn-share-copy:hover { background:#4c3bc4; }
    .btn-share-copy.copied { background:#2ed573; }
    .btn-share-native {
      width:100%; padding:10px; border-radius:12px; border:1px solid #ddd6fe;
      background:#f3f0ff; color:#5f4bdb; font-weight:600; cursor:pointer;
    }
    .create-chat-size-btns { display:flex; gap:6px; }
    .create-chat-size-btns button {
      width:32px; height:32px; border-radius:10px; border:1px solid #ddd6fe;
      background:#fff; color:#5f4bdb; cursor:pointer; font-size:.85rem;
    }
    .create-chat-size-btns button:hover { background:#ede9fe; }
    .create-chat-messages {
      flex:1; overflow-y:auto; padding:24px 22px; display:flex; flex-direction:column;
      gap:20px; background:#fdfcff; min-height:0;
    }
    .create-chat-input-area { padding:14px 20px 16px; border-top:1px solid #f0edf5; background:#fff; }
    .create-input-toolbar {
      display:flex; align-items:center; justify-content:space-between; gap:10px;
      margin-bottom:10px; flex-wrap:wrap;
    }
    .ratio-chip-row { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
    .ratio-label { font-size:.78rem; color:#888; margin-right:4px; }
    .ratio-chip {
      padding:4px 10px; border-radius:14px; border:1px solid #e8e2f5; background:#fff;
      font-size:.75rem; cursor:pointer; color:#666; transition:.15s;
    }
    .ratio-chip.active { background:#ffb347; border-color:#ffb347; color:#2c2c3a; font-weight:700; }
    .btn-quote-portfolio {
      padding:6px 12px; border-radius:16px; border:1px solid #ddd6fe; background:#f3f0ff;
      color:#5f4bdb; font-size:.78rem; cursor:pointer; white-space:nowrap;
    }
    .btn-quote-portfolio:hover { background:#ede9fe; }
    .create-input-row { display:flex; gap:10px; align-items:flex-end; }
    .create-input {
      flex:1; border:2px solid #e8e2f5; border-radius:20px; padding:14px 22px;
      font-size:1rem; background:#faf8ff; min-height:52px; max-height:160px;
      margin:0; resize:none; line-height:1.5; word-break:break-word; overflow-y:auto;
      font-family:inherit; box-sizing:border-box;
    }
    .btn-upload-file {
      width:44px; height:44px; border-radius:50%; border:1px solid #ddd6fe;
      background:#f3f0ff; color:#5f4bdb; cursor:pointer; flex-shrink:0;
      display:flex; align-items:center; justify-content:center; font-size:.95rem;
    }
    .btn-upload-file:hover { background:#ede9fe; }
    .btn-upload-file:disabled { opacity:.5; cursor:not-allowed; }
    .attachment-preview { margin-bottom:8px; }
    .attachment-preview .ap-header {
      display:flex; align-items:center; justify-content:space-between; margin-bottom:8px;
    }
    .attachment-grid {
      display:flex; flex-wrap:wrap; gap:8px; max-height:140px; overflow-y:auto;
    }
    .attachment-grid-item {
      position:relative; width:72px; height:72px; border-radius:10px; overflow:hidden;
      border:1px solid #e0d6ff; background:#f3f0ff; flex-shrink:0;
    }
    .attachment-grid-item img { width:100%; height:100%; object-fit:cover; }
    .attachment-grid-item.file-item {
      display:flex; align-items:center; justify-content:center; padding:6px;
      font-size:.65rem; color:#666; text-align:center; word-break:break-all;
    }
    .attachment-grid-item .att-remove {
      position:absolute; top:2px; right:2px;
    }
    .ai-vision-card {
      background:linear-gradient(135deg,#f0f9ff,#e8f4ff);
      border:1px solid #bae6fd; border-radius:14px; padding:12px 14px;
      margin-bottom:12px; font-size:.85rem; color:#444; line-height:1.55;
    }
    .ai-vision-card h4 { margin:0 0 8px; font-size:.9rem; color:#0369a1; }
    .ai-vision-card .av-row { margin-bottom:6px; }
    .ai-vision-card .av-label { color:#0284c7; font-weight:600; margin-right:6px; }
    .result-img-wrap {
      position:relative; display:inline-block; max-width:100%; margin-bottom:8px;
    }
    .result-img-wrap:last-child { margin-bottom:0; }
    .result-img-gallery { display:flex; flex-wrap:wrap; gap:10px; }
    .merch-img-label {
      margin:0 0 6px; font-size:.82rem; font-weight:600; color:#059669;
      letter-spacing:.02em;
    }
    .result-img-wrap .img-download-btn {
      position:absolute; right:10px; top:50%; transform:translateY(-50%) translateX(12px);
      opacity:0; transition:opacity .2s, transform .2s;
      width:36px; height:36px; border-radius:10px; border:none;
      background:rgba(95,75,219,.92); color:#fff; cursor:pointer;
      display:flex; align-items:center; justify-content:center; font-size:.95rem;
      box-shadow:0 4px 12px rgba(0,0,0,.2); z-index:2;
    }
    .result-img-wrap .img-quote-btn {
      position:absolute; right:52px; top:50%; transform:translateY(-50%) translateX(12px);
      opacity:0; transition:opacity .2s, transform .2s;
      width:36px; height:36px; border-radius:10px; border:none;
      background:rgba(255,255,255,.92); color:#5f4bdb; cursor:pointer;
      display:flex; align-items:center; justify-content:center; font-size:.85rem;
      box-shadow:0 4px 12px rgba(0,0,0,.15); z-index:2;
    }
    .result-img-wrap:hover .img-download-btn,
    .result-img-wrap:hover .img-quote-btn {
      opacity:1; transform:translateY(-50%) translateX(0);
    }
    .result-video-wrap .video-quote-btn { right:52px; top:12px; transform:translateX(12px); }
    .result-video-wrap:hover .video-quote-btn { transform:translateX(0); }
    .user-msg-images { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
    .user-img-wrap .user-sent-img {
      width:120px; height:120px; object-fit:cover; border-radius:12px; display:block;
      cursor:zoom-in; background:#f3f0ff;
    }
    .user-img-wrap .img-quote-btn { right:8px; top:auto; bottom:8px; transform:translateY(0) translateX(12px); }
    .user-img-wrap:hover .img-quote-btn { transform:translateY(0) translateX(0); }
    .quotable-inline-btn {
      display:inline-flex; align-items:center; gap:4px; margin-top:8px;
      padding:4px 12px; font-size:.75rem; border-radius:8px;
      border:1px solid #c4b5fd; background:#faf8ff; color:#5f4bdb; cursor:pointer;
    }
    .quotable-inline-btn:hover { background:#ede9fe; }
    .story-result-card { position:relative; }
    .music-quote-btn {
      width:32px; height:32px; border-radius:8px; border:1px solid #ddd6fe;
      background:#faf8ff; color:#5f4bdb; cursor:pointer;
      display:inline-flex; align-items:center; justify-content:center;
    }
    .music-quote-btn:hover { background:#ede9fe; }
    .ai-analysis-card, .ai-vision-card, .ai-formatted-text { position:relative; }
    .ai-analysis-card {
      background:linear-gradient(135deg,#f8f6ff,#f0ecff);
      border:1px solid #ddd6fe; border-radius:14px; padding:12px 14px;
      margin-bottom:12px; font-size:.85rem; color:#444; line-height:1.55;
    }
    .ai-analysis-card h4 {
      margin:0 0 8px; font-size:.82rem; color:#5f4bdb; font-weight:600;
    }
    .ai-analysis-card .aac-row { margin-bottom:6px; }
    .ai-analysis-card .aac-label { color:#888; margin-right:6px; flex-shrink:0; }
    .ai-analysis-card .aac-primary { display:flex; gap:4px; align-items:flex-start; }
    .ai-analysis-card .aac-primary-text {
      font-weight:600; color:#2b2844; flex:1;
    }
    .ai-analysis-card .aac-details { display:flex; gap:4px; align-items:flex-start; }
    .ai-analysis-card .aac-detail-list {
      margin:0; padding:0 0 0 4px; list-style:none; flex:1;
    }
    .ai-analysis-card .aac-detail-item {
      position:relative; padding-left:12px; margin-bottom:3px; color:#555;
    }
    .ai-analysis-card .aac-detail-item::before {
      content:'·'; position:absolute; left:0; color:#8b5cf6; font-weight:700;
    }
    .ai-analysis-card .aac-reason { color:#666; font-size:.82rem; }
    .ai-analysis-card .aac-tags {
      display:flex; flex-wrap:wrap; gap:6px; margin-top:8px;
    }
    .ai-analysis-card .aac-tag {
      background:#ede9fe; color:#5f4bdb; padding:2px 8px; border-radius:999px; font-size:.75rem;
    }
    .result-video-wrap {
      position:relative; max-width:100%; margin:8px 0; border-radius:14px; overflow:hidden;
      background:#000; box-shadow:0 8px 24px rgba(95,75,219,.15);
    }
    .result-video-wrap video {
      width:100%; max-height:420px; display:block; background:#111; pointer-events:none;
    }
    .video-preview-trigger {
      position:relative; cursor:pointer; display:block;
    }
    .video-preview-trigger .video-play-overlay {
      position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
      background:rgba(0,0,0,.28); transition:background .2s;
    }
    .video-preview-trigger .video-play-overlay i {
      width:56px; height:56px; border-radius:50%; background:rgba(95,75,219,.92); color:#fff;
      display:flex; align-items:center; justify-content:center; font-size:1.4rem;
      box-shadow:0 8px 24px rgba(0,0,0,.35); padding-left:4px;
    }
    .video-preview-trigger:hover .video-play-overlay { background:rgba(0,0,0,.38); }
    .video-preview-modal {
      display:none; position:fixed; inset:0; z-index:2500; align-items:center; justify-content:center;
    }
    .video-preview-modal.active { display:flex; }
    .video-preview-modal .vpm-backdrop {
      position:absolute; inset:0; background:rgba(0,0,0,.82); backdrop-filter:blur(8px);
    }
    .video-preview-modal .vpm-panel {
      position:relative; z-index:1; width:min(920px,94vw); background:#1a1830; border-radius:16px;
      overflow:hidden; box-shadow:0 24px 64px rgba(0,0,0,.45);
      display:flex; flex-direction:column; max-height:92vh;
    }
    .video-preview-modal .vpm-panel.vpm-with-script { width:min(1180px,96vw); }
    .video-preview-modal .vpm-body {
      display:flex; flex-direction:row; align-items:stretch; min-height:0; flex:1; overflow:hidden;
    }
    .video-preview-modal .vpm-script-pane {
      width:42%; max-width:460px; min-width:280px; overflow-y:auto; background:#141226;
      border-right:1px solid rgba(255,255,255,.08); display:none;
    }
    .video-preview-modal .vpm-with-script .vpm-script-pane { display:block; }
    .video-preview-modal .vpm-video-pane {
      flex:1; min-width:0; display:flex; flex-direction:column;
    }
    .script-sync-panel { padding:12px 10px 16px; color:#ddd; }
    .script-sync-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
    .script-sync-head h4 { margin:0; font-size:.92rem; color:#fff; }
    .script-sync-total { font-size:.75rem; color:#a78bfa; }
    .script-sync-table-wrap { overflow-x:auto; border-radius:10px; border:1px solid rgba(255,255,255,.08); }
    .script-sync-table { width:100%; border-collapse:collapse; font-size:.76rem; min-width:420px; }
    .script-sync-table th {
      position:sticky; top:0; z-index:1; background:#1e1b36; color:#a78bfa;
      text-align:left; padding:8px 8px; border-bottom:1px solid rgba(255,255,255,.1);
    }
    .script-sync-table td {
      padding:8px 8px; border-bottom:1px solid rgba(255,255,255,.06);
      vertical-align:top; line-height:1.45; color:#ccc;
    }
    .script-sync-row { cursor:pointer; transition:background .15s; }
    .script-sync-row:hover { background:rgba(95,75,219,.12); }
    .script-sync-row.active { background:rgba(95,75,219,.28); }
    .script-sync-row.active td { color:#fff; }
    .script-sync-row.active .script-sync-no { color:#c4b5fd; font-weight:700; }
    .script-sync-no { white-space:nowrap; color:#a78bfa; font-weight:600; width:42px; }
    .script-sync-dur { white-space:nowrap; color:#9ca3af; width:72px; }
    .script-sync-scene { min-width:100px; }
    .script-sync-dialogue { min-width:90px; color:#bbb; }
    .script-sync-bgm { min-width:72px; color:#888; font-size:.72rem; }
    .script-sync-notes {
      margin-top:10px; padding-top:8px; border-top:1px dashed rgba(255,255,255,.12);
      font-size:.78rem; line-height:1.55; color:#999;
    }
    .video-preview-modal .vpm-header {
      display:flex; align-items:center; justify-content:space-between; padding:12px 16px;
      color:#fff; font-weight:600; background:rgba(255,255,255,.06); flex-shrink:0;
    }
    .video-preview-modal .vpm-header #vpmTitle {
      flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
      font-size:.95rem; font-weight:600;
    }
    .video-preview-modal .vpm-close {
      flex-shrink: 0;
    }
    .video-preview-modal .vpm-screen {
      background:#000; display:flex; align-items:center; justify-content:center; min-height:200px;
    }
    .video-preview-modal .vpm-screen video {
      width:100%; max-height:70vh; display:block; background:#000;
    }
    .video-preview-modal .vpm-controls {
      display:flex; align-items:center; gap:10px; padding:12px 16px; background:#12101f;
    }
    .video-preview-modal .vpm-btn {
      border:none; background:rgba(255,255,255,.1); color:#fff; width:36px; height:36px;
      border-radius:50%; cursor:pointer; flex-shrink:0;
    }
    .video-preview-modal .vpm-btn:hover { background:rgba(95,75,219,.6); }
    .video-preview-modal .vpm-time {
      color:#ccc; font-size:.82rem; min-width:88px; flex-shrink:0;
    }
    .video-preview-modal .vpm-progress {
      flex:1; min-width:60px; accent-color:#5f4bdb;
    }
    .video-preview-modal .vpm-volume {
      width:72px; accent-color:#5f4bdb; flex-shrink:0;
    }
    .result-video-wrap .img-download-btn { top:12px; transform:translateY(0); }
    .result-video-wrap:hover .img-download-btn { transform:translateY(0); }
    .create-session-item-wrap {
      position:relative; display:flex; align-items:stretch;
    }
    .create-session-item-wrap .create-session-item { flex:1; text-align:left; }
    .btn-session-delete {
      flex-shrink:0; width:32px; border:none; background:transparent; color:#bbb;
      cursor:pointer; font-size:.85rem; border-radius:0 12px 12px 0;
    }
    .btn-session-delete:hover { color:#e74c3c; background:#fff5f5; }
    .token-float-ball {
      position:absolute; top:10px; right:14px; z-index:15;
    }
    .token-ball-btn {
      width:46px; height:46px; border-radius:50%; border:none; cursor:pointer;
      background:linear-gradient(135deg,#5f4bdb,#8b5cf6); color:#fff;
      box-shadow:0 4px 16px rgba(95,75,219,.35); display:flex; flex-direction:column;
      align-items:center; justify-content:center; gap:0; font-size:.72rem; font-weight:700;
      line-height:1.1; padding:4px; transition:transform .2s, box-shadow .2s;
    }
    .token-ball-btn:hover { transform:scale(1.06); box-shadow:0 6px 20px rgba(95,75,219,.45); }
    .token-ball-icon { font-size:.85rem; line-height:1; }
    .token-ball-pop {
      display:none; position:absolute; top:52px; right:0; min-width:180px;
      background:#fff; border:1px solid #ede9fe; border-radius:16px;
      box-shadow:0 8px 28px rgba(95,75,219,.18); padding:12px 14px;
      font-size:.85rem; color:#666;
    }
    .token-float-ball.open .token-ball-pop { display:block; }
    .token-ball-row { margin-bottom:10px; }
    .token-ball-row strong { color:#2ed573; margin-left:4px; }
    .token-ball-hint { font-size:.72rem; color:#aaa; margin-top:6px; line-height:1.4; }
    .recharge-panel { max-width:480px; }
    .recharge-package-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px; }
    .recharge-pack-btn {
      display:flex; flex-direction:column; align-items:center; gap:4px; padding:14px 10px;
      border:1.5px solid #e8e0ff; border-radius:16px; background:#faf8ff; cursor:pointer; transition:.15s;
    }
    .recharge-pack-btn strong { font-size:1.05rem; color:#5f4bdb; }
    .recharge-pack-btn span { font-size:.88rem; color:#333; }
    .recharge-pack-btn em { font-size:.72rem; color:#999; font-style:normal; }
    .recharge-pack-btn:hover { border-color:#5f4bdb; background:#f0ebff; transform:translateY(-1px); }
    .token-float-ball .btn-clear-session {
      width:100%; margin:0; text-align:center;
    }
    .create-send-btn {
      background:#5f4bdb; color:#fff; width:52px; height:52px; border-radius:50%;
      border:none; cursor:pointer; font-size:1.2rem; flex-shrink:0;
      display:flex; align-items:center; justify-content:center;
      transition: background .2s, transform .15s, box-shadow .2s;
    }
    .create-send-btn:hover { transform: scale(1.04); }
    .create-send-btn.is-stop {
      background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
      box-shadow: 0 4px 14px rgba(238, 90, 90, .35);
    }
    .create-send-btn.is-stop:hover { background: linear-gradient(135deg, #ff5252, #e04545); }
    .gen-aborted { color: #888; font-size: .92rem; }
    .ai-msg .bubble .gen-aborted { display: inline-flex; align-items: center; gap: 6px; }
    .gen-loading {
      padding: 10px 4px 8px; min-width: 0;
    }
    .gen-loading-line {
      margin: 0; text-align: center; font-size: .88rem; line-height: 1.6;
      color: #888; font-weight: 500;
    }
    .gen-bounce {
      display: inline-block;
      animation: genWordBounce 2.55s ease-in-out infinite;
    }
    .gen-bounce-sep {
      color: #ccc; margin: 0 1px;
    }
    .ai-analysis-card .aac-history { font-size: .82rem; color: #666; }
    @keyframes genWordBounce {
      0%, 72%, 100% { transform: translateY(0); color: #999; font-weight: 500; }
      12% { transform: translateY(-7px); color: #5f4bdb; font-weight: 600; }
      24% { transform: translateY(0); color: #999; font-weight: 500; }
    }
    .create-mode-bar {
      display:flex; gap:12px; padding:14px 20px; background:#faf9fc; flex-wrap:wrap;
    }
    .ai-avatar { width:42px; height:42px; border-radius:14px; display:flex; align-items:center; justify-content:center; color:#fff; flex-shrink:0; }
    .ai-avatar-bot { background:linear-gradient(135deg,#c4b5fd,#8b5cf6); }
    .ai-avatar-user { background:#5f4bdb; }
    .ai-formatted-text { line-height:1.75; color:#333; }
    .ai-formatted-text p { margin:0 0 10px; }
    .ai-formatted-text p:last-child { margin-bottom:0; }
    .work-result-img {
      max-width:100%; max-height:420px; width:auto; height:auto;
      border-radius:14px; display:block; box-shadow:0 8px 24px rgba(95,75,219,.15);
      object-fit:contain; cursor:zoom-in; background:#f3f0ff;
      user-select:none;
    }
    .quote-block .quote-thumb { cursor:zoom-in; }
    .work-result-img.ratio-16-9, .work-result-img.ratio-9-16 { max-height:360px; }
    .work-result-img.ratio-3-4, .work-result-img.ratio-2-3 { max-height:480px; }
    .image-preview-modal {
      display:none; position:fixed; inset:0; z-index:9600; background:rgba(0,0,0,.88);
      align-items:center; justify-content:center; padding:24px;
    }
    .image-preview-modal.show { display:flex; }
    .image-preview-modal img { max-width:95vw; max-height:90vh; object-fit:contain; border-radius:12px; }
    .image-preview-close {
      position:fixed; top:20px; right:24px; z-index: 9700;
    }
    .portfolio-quote-panel { max-width:640px; max-height:80vh; overflow-y:auto; position:relative; }
    .portfolio-quote-tabs { display:flex; gap:8px; margin-bottom:12px; }
    .portfolio-quote-tab {
      flex:1; border:1.5px solid #e8e0ff; background:#fff; color:#666; border-radius:12px;
      padding:8px 12px; font-size:.88rem; cursor:pointer; transition:.2s;
    }
    .portfolio-quote-tab.active { border-color:#5f4bdb; background:#f0ebff; color:#5f4bdb; font-weight:600; }
    .portfolio-quote-list { display:flex; flex-direction:column; gap:10px; }
    .portfolio-quote-item.script-item .pq-script-preview {
      font-size:.78rem; color:#666; line-height:1.5; margin-top:4px;
      display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
    }
    .portfolio-quote-item {
      display:flex; gap:14px; align-items:center; padding:12px 14px; border-radius:14px;
      border:1px solid #ede9fe; background:#faf8ff; cursor:pointer; transition:.15s;
    }
    .portfolio-quote-item:hover { border-color:#c4b5fd; background:#f3f0ff; }
    .portfolio-quote-item img { width:64px; height:64px; border-radius:10px; object-fit:cover; background:#e8e2f5; }
    .portfolio-quote-item h4 { margin:0 0 4px; font-size:.95rem; color:#2b2844; }
    .portfolio-quote-item p { margin:0; font-size:.8rem; color:#888; }
    .portfolio-quote-item.selected { border-color:#5f4bdb; background:#f0ebff; box-shadow:0 4px 12px rgba(95,75,219,.12); }
    .portfolio-quote-item .pq-check {
      width:22px; height:22px; border-radius:6px; border:2px solid #c4b5fd; display:flex; align-items:center; justify-content:center;
      flex-shrink:0; color:#fff; font-size:.75rem;
    }
    .portfolio-quote-item.selected .pq-check { background:#5f4bdb; border-color:#5f4bdb; }
    .portfolio-quote-footer {
      display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; padding-top:14px; border-top:1px solid #f0ebff;
    }
    .portfolio-quote-footer span { color:#888; font-size:.9rem; }
    .msg-actions button.btn-regen { border-color:#ffb347; color:#e67e22; }
    .msg-actions button.btn-regen:hover { background:#fff4e0; }
    .quote-preview .qp-close {
      position:absolute; top:8px; right:8px; z-index: 2;
    }

    /* 创作结果 · 添加到我的作品 */
    .work-result-card {
      border-radius:16px; padding:4px; margin:-4px;
    }
    .result-actions { display:flex; align-items:center; gap:10px; margin-top:14px; flex-wrap:wrap; }
    .btn-add-work {
      background:linear-gradient(135deg,#5f4bdb,#8b5cf6); color:#fff; border:none;
      padding:10px 18px; border-radius:24px; font-size:.88rem; font-weight:600; cursor:pointer;
      display:inline-flex; align-items:center; gap:6px; transition:.2s;
    }
    .btn-add-work:hover { transform:translateY(-1px); box-shadow:0 6px 16px rgba(95,75,219,.35); }
    .btn-add-work:disabled { opacity:.7; cursor:wait; transform:none; }
    .in-portfolio-badge { color:#2ed573; font-size:.85rem; font-weight:600; display:inline-flex; align-items:center; gap:5px; }
    .btn-go-works {
      background:#f3f0ff; color:#5f4bdb; border:1px solid #ddd6fe;
      padding:8px 14px; border-radius:20px; font-size:.82rem; cursor:pointer;
    }
    .btn-go-works:hover { background:#ede9fe; }
    .work-click-hint { margin-top:8px; font-size:.78rem; color:#aaa; cursor:pointer; }
    .work-click-hint:hover { color:#8b5cf6; }
    .work-click-hint.done { color:#2ed573; }
    .work-click-hint.done:hover { color:#27ae60; }
    .round-tag {
      font-size:.75rem; color:#aaa; margin-top:10px; padding-top:8px;
      border-top:1px dashed #ede9fe;
    }
    .ai-msg.user .round-tag { border-top-color:rgba(255,255,255,.25); color:rgba(255,255,255,.75); }
    .create-token-bar {
      display:flex; align-items:center; gap:16px; flex-wrap:wrap;
      margin-top:12px; padding:10px 14px; background:#faf8ff;
      border:1px solid #ede9fe; border-radius:14px; font-size:.85rem; color:#666;
    }
    .create-setup-intro {
      background:#fff; border-radius:20px; padding:18px 22px; margin-bottom:15px;
    }
    .create-token-bar .token-stat strong { color:#2b2844; margin-left:4px; }
    .create-token-bar .token-stat.cost strong { color:#2ed573; }
    .btn-clear-session {
      margin-left:auto; background:#fff; border:1px solid #ddd6fe; color:#5f4bdb;
      padding:5px 14px; border-radius:16px; font-size:.8rem; cursor:pointer;
    }
    .btn-clear-session:hover { background:#f3f0ff; }
    .work-type-badge {
      display:inline-block; background:#ede9fe; color:#5f4bdb;
      font-size:.72rem; padding:2px 8px; border-radius:10px; margin-bottom:6px;
    }
    .works-list { display:flex; flex-direction:column; gap:16px; margin-top:12px; }
    .work-row {
      display:flex; gap:20px; align-items:stretch; position:relative;
      background:#fff; border-radius:20px; overflow:hidden;
      box-shadow:0 6px 20px rgba(95,75,219,.08); cursor:pointer;
      transition:transform .2s, box-shadow .2s; border:1px solid #f0edf5;
    }
    .work-row-delete {
      position:absolute; top:12px; right:12px; z-index:2;
      width:34px; height:34px; border-radius:50%; border:none;
      background:rgba(255,255,255,.92); color:#999; cursor:pointer;
      display:flex; align-items:center; justify-content:center;
      box-shadow:0 2px 8px rgba(0,0,0,.08); transition:color .2s, background .2s;
    }
    .work-row-delete:hover { color:#e74c3c; background:#fff5f5; }
    .session-detail-actions { margin-top:24px; padding-top:16px; border-top:1px solid #f0edf5; }
    .btn-work-delete {
      background:#fff; border:1px solid #fecaca; color:#e74c3c;
      padding:8px 16px; border-radius:12px; font-size:.88rem; cursor:pointer;
    }
    .btn-work-delete:hover { background:#fff5f5; }
    .work-row:hover {
      transform:translateY(-2px);
      box-shadow:0 12px 28px rgba(95,75,219,.15);
      border-color:#ddd6fe;
    }
    .work-row-cover {
      width:200px; min-width:200px; height:160px; flex-shrink:0;
      display:flex; align-items:center; justify-content:center;
      background:linear-gradient(135deg,#f0ebff,#e0d6ff);
      font-size:3.5rem; overflow:hidden;
    }
    .work-row-cover img { width:100%; height:100%; object-fit:cover; display:block; }
    .work-row-body {
      flex:1; min-width:0; padding:18px 20px 18px 0;
      display:flex; flex-direction:column; justify-content:center;
    }
    .work-row-body h4 { font-size:1.15rem; color:#2b2844; margin:6px 0 8px; line-height:1.35; }
    .work-row-desc { color:#666; font-size:.92rem; line-height:1.6; margin:0 0 10px;
      display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
    .work-row-meta { display:flex; flex-wrap:wrap; gap:12px; align-items:center; font-size:.8rem; color:#aaa; }
    .work-row-meta .style-tag { color:#8b5cf6; background:#f3f0ff; padding:2px 10px; border-radius:12px; }
    .works-empty { text-align:center; color:#888; padding:40px 20px; background:#faf8ff; border-radius:20px; }
    @media (max-width:640px) {
      .work-row { flex-direction:column; }
      .work-row-cover { width:100%; min-width:0; height:180px; }
      .work-row-body { padding:0 16px 16px; }
    }
    .creation-modal {
      display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:9000;
      align-items:center; justify-content:center; padding:20px;
    }
    .creation-modal.show { display:flex; }
    .creation-modal-panel {
      background:#fff; border-radius:24px; padding:28px; max-width:820px; width:100%;
      max-height:85vh; overflow-y:auto; position:relative; box-shadow:0 20px 60px rgba(0,0,0,.2);
    }
    .creation-modal-layout { display:flex; gap:24px; align-items:flex-start; }
    .creation-modal-cover {
      width:240px; min-width:240px; border-radius:16px; overflow:hidden;
      background:linear-gradient(135deg,#f0ebff,#e0d6ff);
      display:flex; align-items:center; justify-content:center; font-size:4rem;
    }
    .creation-modal-cover img { width:100%; display:block; object-fit:cover; max-height:320px; }
    .creation-modal-info { flex:1; min-width:0; }
    @media (max-width:640px) {
      .creation-modal-layout { flex-direction:column; }
      .creation-modal-cover { width:100%; min-width:0; }
    }
    .publish-ip-panel { max-width: 560px; width: min(560px, 94vw); max-height: 88vh; overflow: auto; }
    .publish-ip-hint { color: #888; font-size: .88rem; line-height: 1.55; margin: 0 0 14px; }
    .publish-ip-note { font-size: .78rem; color: #9a93b8; margin: -4px 0 12px; min-height: 1.1em; }
    .publish-ip-sync-row { margin-bottom: 10px; }
    .publish-ip-sync-label { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: #666; cursor: pointer; }
    .publish-ip-items { display: flex; flex-direction: column; gap: 8px; max-height: 38vh; overflow: auto; padding: 2px 0; margin-bottom: 12px; }
    .publish-ip-item {
      display: grid; grid-template-columns: 52px 72px 1fr; gap: 10px; align-items: center;
      background: #faf8ff; border: 1px solid #ede9fe; border-radius: 12px; padding: 8px 10px;
    }
    .publish-ip-item-thumb {
      width: 52px; height: 52px; border-radius: 10px; background: linear-gradient(135deg,#f0ebff,#e0d6ff);
      display: flex; align-items: center; justify-content: center; font-size: 1.4rem; overflow: hidden;
    }
    .publish-ip-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .publish-ip-item-type { font-size: .75rem; color: #8b5cf6; font-weight: 700; }
    .publish-ip-item input {
      width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid #e0d6ff; font-size: .88rem;
    }
    .publish-ip-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
    .media-card-edit {
      position: absolute; top: 8px; left: 8px; z-index: 2;
      width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer;
      background: rgba(255,255,255,.92); color: #5f4bdb; box-shadow: 0 2px 8px rgba(0,0,0,.12);
      display: inline-flex; align-items: center; justify-content: center; font-size: .72rem;
    }
    .media-card-edit:hover { background: #fff; color: #8b5cf6; }
    .media-card { position: relative; }
      position:absolute; top:12px; right:16px; border:none; background:none;
      font-size:28px; color:#888; cursor:pointer; line-height:1;
    }
    .creation-modal-img { width:100%; border-radius:16px; display:block; }
    .creation-modal-text { line-height:1.7; color:#444; white-space:pre-wrap; }
    .session-detail-head { margin-bottom:8px; }
    .session-section-title { font-size:.95rem; color:#5f4bdb; margin:0 0 12px; display:flex; align-items:center; gap:8px; }
    .session-gallery {
      display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:12px;
    }
    .session-gallery-item {
      position:relative; border-radius:14px; overflow:hidden; aspect-ratio:1;
      box-shadow:0 4px 16px rgba(95,75,219,.12); display:block;
      transition:transform .2s, box-shadow .2s;
    }
    .session-gallery-item:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(95,75,219,.2); }
    .session-gallery-item img { width:100%; height:100%; object-fit:cover; display:block; }
    .session-gallery-label {
      position:absolute; left:8px; top:8px; background:rgba(0,0,0,.45); color:#fff;
      font-size:.72rem; padding:2px 8px; border-radius:10px;
    }
    .session-text-list { display:flex; flex-direction:column; gap:12px; }
    .session-text-item {
      background:#faf8ff; border:1px solid #ede9fe; border-radius:14px; padding:12px 14px;
    }
    .session-text-item p { margin:8px 0; color:#555; font-size:.9rem; line-height:1.55; }
    .mode-chip { padding:12px 22px; border-radius:35px; cursor:pointer; border:2px solid #e8e2f5; background:#fff; transition:.2s; }
    .mode-chip.active { background:#5f4bdb; color:#fff; border-color:#5f4bdb; }

    /* ===== 首页·核心创作入口 ===== */
    .hero-create { background: linear-gradient(135deg,#6b4bff,#9b6dff); border-radius:32px; padding:30px; color:#fff; display:flex; gap:25px; flex-wrap:wrap; align-items:center; box-shadow:0 20px 40px rgba(95,75,219,0.25); }
    .hero-create .hero-left { flex:1; min-width:240px; }
    .hero-create h2 { color:#fff; margin-bottom:8px; }
    .hero-create p { opacity:.92; margin-bottom:18px; }
    .hero-btns { display:flex; gap:12px; flex-wrap:wrap; }
    .btn-glow { background:#ffb347; color:#2c2c3a; border:none; padding:13px 26px; border-radius:30px; font-weight:700; cursor:pointer; transition:.2s; display:inline-flex; align-items:center; gap:8px; }
    .btn-glow:hover { transform:translateY(-2px); box-shadow:0 10px 20px rgba(255,179,71,.4); }
    .btn-ghost { background:rgba(255,255,255,.18); color:#fff; border:2px solid rgba(255,255,255,.5); padding:11px 24px; border-radius:30px; font-weight:600; cursor:pointer; display:inline-flex; align-items:center; gap:8px; }
    .btn-ghost:hover { background:rgba(255,255,255,.3); }
    .inspo-machine { background:rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.35); border-radius:24px; padding:22px; min-width:240px; flex:1; backdrop-filter:blur(8px); }
    .inspo-machine .label { font-size:.85rem; opacity:.85; display:flex; align-items:center; gap:6px; }
    .inspo-machine .text { font-size:1.25rem; font-weight:700; margin:10px 0 15px; line-height:1.4; min-height:60px; }
    .inspo-refresh { background:#fff; color:#5f4bdb; border:none; padding:8px 18px; border-radius:20px; font-weight:600; cursor:pointer; }

    /* ===== 动态看板 ===== */
    .board { background:#fff; border-radius:24px; padding:20px 25px; box-shadow:0 8px 20px rgba(0,0,0,.05); }
    .ticker { height:30px; overflow:hidden; position:relative; }
    .ticker-track { position:absolute; animation:tickerUp 12s linear infinite; }
    .ticker-item { height:30px; line-height:30px; color:#555; }
    .ticker-item i { color:#ff6b6b; }
    @keyframes tickerUp { 0%{top:0;} 100%{top:var(--ticker-shift, -150px);} }
    .event-banner { margin-top:15px; background:linear-gradient(135deg,#fff0f0,#ffe0e8); border-radius:20px; padding:18px 22px; display:flex; align-items:center; justify-content:space-between; gap:15px; flex-wrap:wrap; }

    /* ===== 通用：筛选标签 / 子tab / 画风 ===== */
    .filter-bar { display:flex; gap:10px; flex-wrap:wrap; margin:15px 0 20px; }
    .filter-chip { padding:8px 18px; border-radius:25px; border:2px solid #e0d6ff; background:#fff; cursor:pointer; font-size:.9rem; font-weight:600; color:#5f4bdb; transition:.2s; }
    .filter-chip.active, .filter-chip:hover { background:#5f4bdb; color:#fff; border-color:#5f4bdb; }
    .sub-tabs { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:20px; }
    .sub-tab { padding:12px 22px; border-radius:30px; border:2px solid #e0d6ff; background:#fff; cursor:pointer; font-weight:600; transition:.2s; display:flex; align-items:center; gap:8px; }
    .sub-tab.active { background:#5f4bdb; color:#fff; border-color:#5f4bdb; }
    .style-chip { padding:7px 16px; border-radius:20px; border:2px solid #e8e2f5; background:#fff; cursor:pointer; font-size:.85rem; transition:.2s; }
    .style-chip.active { background:#ffb347; color:#2c2c3a; border-color:#ffb347; font-weight:700; }

    /* ===== 衍生创作卡 ===== */
    .derive-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:18px; }
    .derive-card { background:#faf8ff; border:2px solid #f0ebff; border-radius:22px; padding:24px; text-align:center; cursor:pointer; transition:.2s; }
    .derive-card:hover { transform:translateY(-4px); border-color:#5f4bdb; box-shadow:0 12px 25px rgba(95,75,219,.15); }
    .derive-card .emoji { font-size:3rem; }
    .derive-card h4 { margin:10px 0 6px; color:#2b2844; }
    .derive-card p { color:#888; font-size:.88rem; }

    /* ===== 数据统计 / 钱包 ===== */
    .wallet-card { background:linear-gradient(135deg,#2b2844,#5f4bdb); color:#fff; border-radius:24px; padding:25px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:15px; }
    .wallet-card .bal { font-size:2.2rem; font-weight:700; }
    .mini-chart { display:flex; align-items:flex-end; gap:6px; height:80px; margin-top:10px; }
    .mini-chart .bar { flex:1; background:linear-gradient(180deg,#9b6dff,#5f4bdb); border-radius:6px 6px 0 0; min-height:8px; }
    .badge-tag { display:inline-block; background:#ffb347; color:#2c2c3a; font-size:.75rem; font-weight:700; padding:2px 10px; border-radius:12px; margin-left:8px; }

/* ===== 登录 ===== */
.login-error {
  color: #ff4757;
  font-size: 0.88rem;
  text-align: center;
  margin: 4px 0 8px;
  min-height: 1.2em;
}

/* ===== 注册页 ===== */
.register-wrap {
  max-width: 440px;
  margin: 0 auto;
  background: #fff;
  border-radius: 32px;
  padding: 36px 32px 28px;
  box-shadow: 0 20px 45px rgba(95, 75, 219, 0.12);
}
.register-wrap h2 {
  font-size: 1.6rem;
  justify-content: center;
  margin-bottom: 8px;
}
.register-sub {
  text-align: center;
  color: #888;
  font-size: 0.95rem;
  margin-bottom: 24px;
}
.register-form .form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #3d3a5c;
  margin: 14px 0 8px;
}
.register-form .form-label .req { color: #ff4757; font-size: 0.8rem; }
.register-form .form-label .opt { color: #a193c9; font-size: 0.8rem; font-weight: 500; }
.register-form input[type="text"],
.register-form input[type="email"],
.register-form input[type="password"],
.register-form input[type="date"] {
  width: 100%;
  padding: 14px 18px;
  margin: 0;
  border-radius: 30px;
  border: 2px solid #e8e2f5;
  background: #faf8ff;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.register-form input:focus {
  outline: none;
  border-color: #5f4bdb;
}
.gender-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.gender-option {
  flex: 1;
  min-width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 30px;
  border: 2px solid #e8e2f5;
  background: #faf8ff;
  cursor: pointer;
  font-weight: 600;
  color: #5f4bdb;
  transition: 0.2s;
}
.gender-option:has(input:checked) {
  background: #5f4bdb;
  color: #fff;
  border-color: #5f4bdb;
}
.gender-option input { width: auto; margin: 0; accent-color: #ffb347; }
.btn-register-submit {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  font-size: 1.05rem;
  background: #ffb347;
  color: #2c2c3a;
}
.btn-register-submit:hover { background: #f5a030; }
.register-foot, .login-foot {
  text-align: center;
  margin-top: 18px;
  color: #888;
  font-size: 0.92rem;
}
.link-btn {
  background: none;
  border: none;
  color: #5f4bdb;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  font-size: inherit;
}
.link-btn:hover { text-decoration: underline; }
.register-back {
  display: block;
  margin: 20px auto 0;
  width: 100%;
  text-align: center;
}

/* 独立分享页 */
.share-page-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(180deg, #f8f6ff 0%, #fdfcff 40%, #fff 100%);
  display: flex;
  flex-direction: column;
}
.share-page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid #ede9fe;
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
}
.share-page-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #2b2844;
  flex-shrink: 0;
}
.share-page-logo .logo-img { width: 32px; height: 32px; }
.share-page-logo .logo-word { font-weight: 800; font-size: 1.05rem; color: #5f4bdb; }
.share-page-title-wrap { flex: 1; min-width: 0; }
.share-page-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #2b2844;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.share-page-meta {
  margin: 2px 0 0;
  font-size: .78rem;
  color: #888;
}
.share-page-cta {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.share-page-main {
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  box-sizing: border-box;
}
.share-page-loading,
.share-page-error {
  text-align: center;
  padding: 48px 20px;
  color: #888;
  font-size: .95rem;
}
.share-page-error p { margin: 0 0 20px; color: #666; }
.share-page-messages {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #fff;
  border: 1px solid #ede9fe;
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 8px 32px rgba(95,75,219,.06);
  min-height: 200px;
}
.share-page-footer {
  text-align: center;
  padding: 16px 20px 24px;
  border-top: 1px solid #f0edf5;
}
.share-page-footer-link {
  color: #5f4bdb;
  font-size: .85rem;
  text-decoration: none;
  font-weight: 600;
}
.share-page-footer-link:hover { text-decoration: underline; }
.share-img-preview {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20,18,35,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
.share-img-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
}
.share-img-preview-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}
@media (max-width: 640px) {
  .share-page-header { padding: 12px 14px; gap: 10px; }
  .share-page-title { font-size: .92rem; }
  .share-page-cta { padding: 7px 14px; font-size: .78rem; }
  .share-page-messages { padding: 18px 14px; border-radius: 16px; }
  .share-page-main .ai-msg .msg-body { max-width: 88%; }
}

/* ===== 教师端 ===== */
body.teacher-portal-body { display:block; background:linear-gradient(160deg,#f4f0ff 0%,#faf8ff 40%,#fff 100%); min-height:100vh; }
.teacher-portal { max-width:1280px; margin:0 auto; padding:16px 16px 24px; min-height:100vh; display:flex; flex-direction:column; }
.teacher-portal .btn { background:#5f4bdb; border:none; color:#fff; padding:12px 24px; border-radius:30px; font-weight:600; cursor:pointer; transition:.2s; font-size:.95rem; }
.teacher-portal .btn:hover { background:#4c3abf; }
.teacher-portal .btn-outline { background:transparent; border:2px solid #5f4bdb; color:#5f4bdb; padding:8px 16px; border-radius:30px; font-size:.85rem; }
.teacher-portal .btn-outline:hover { background:#f5f3ff; transform:none; }
.teacher-portal-head { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:14px; flex-wrap:wrap; flex-shrink:0; }
.teacher-portal-brand { display:flex; align-items:center; gap:14px; min-width:0; }
.teacher-portal-brand .logo-img { width:40px; height:40px; flex-shrink:0; }
.teacher-portal-brand h1 { font-size:1.15rem; color:#2b2844; margin-bottom:2px; }
.teacher-portal-brand p { color:#888; font-size:.8rem; line-height:1.4; }
.teacher-portal-user { display:flex; align-items:center; gap:12px; color:#555; font-size:.88rem; flex-shrink:0; }
.teacher-login-panel { flex:1; display:flex; align-items:center; justify-content:center; padding:24px 0 40px; }
.teacher-card { background:#fff; border-radius:24px; box-shadow:0 10px 30px rgba(95,75,219,.08); padding:28px 24px; width:100%; max-width:420px; margin:0; }
.teacher-card h2 { font-size:1.15rem; color:#2b2844; margin-bottom:8px; }
.teacher-hint { color:#888; font-size:.85rem; margin-bottom:14px; line-height:1.5; }
.teacher-card input { width:100%; padding:12px 14px; border:1px solid #e8e4f5; border-radius:14px; margin-bottom:12px; font-size:.95rem; }
.teacher-card .btn { width:100%; margin-top:4px; }
.teacher-footnote { margin-top:14px; font-size:.8rem; color:#aaa; text-align:center; }
.teacher-workspace { display:flex; gap:16px; flex:1; min-height:0; height:calc(100vh - 96px); }
.teacher-sidebar { width:340px; flex-shrink:0; background:#fff; border-radius:22px; box-shadow:0 8px 24px rgba(95,75,219,.08); display:flex; flex-direction:column; overflow:hidden; min-height:0; }
.teacher-sidebar-top { flex-shrink:0; border-bottom:1px solid #f0edf5; }
.teacher-add-bar { padding:14px 14px 12px; }
.teacher-add-bar label { display:flex; align-items:center; gap:6px; font-size:.82rem; font-weight:600; color:#5f4bdb; margin-bottom:8px; }
.teacher-add-error { margin-top:8px; font-size:.78rem; color:#e74c3c; line-height:1.4; }
.teacher-add-status { margin-top:8px; font-size:.78rem; color:#5f4bdb; line-height:1.4; font-weight:600; }
.teacher-add-status.is-error { color:#e74c3c; }
.teacher-add-status.is-ok { color:#059669; }
.teacher-sidebar-filter { display:flex; align-items:center; gap:8px; padding:0 14px 12px; }
.teacher-sidebar-filter input { flex:1; min-width:0; padding:9px 12px; border:1px solid #e8e4f5; border-radius:12px; font-size:.85rem; }
.teacher-saved-count { flex-shrink:0; font-size:.72rem; color:#999; background:#f8f7fc; padding:4px 8px; border-radius:10px; white-space:nowrap; }
.teacher-sidebar-body { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; position:relative; }
.teacher-id-lookup { display:flex; gap:8px; align-items:stretch; }
.teacher-id-lookup input { flex:1; min-width:0; padding:10px 12px; border:1px dashed #ddd6fe; border-radius:12px; font-size:.8rem; font-family:ui-monospace,monospace; background:#faf8ff; }
.teacher-id-lookup input:focus { outline:none; border-color:#5f4bdb; background:#fff; }
.teacher-id-lookup .btn-sm-purple { flex-shrink:0; min-width:64px; height:40px; padding:0 16px; border:none; border-radius:12px; background:#5f4bdb; color:#fff; font-size:.82rem; font-weight:600; cursor:pointer; }
.teacher-id-lookup .btn-sm-purple:disabled { opacity:.65; cursor:wait; }
.teacher-list-hint { flex:1; display:flex; align-items:center; justify-content:center; padding:24px 20px; color:#aaa; font-size:.85rem; text-align:center; line-height:1.5; }
.teacher-conv-list { flex:1; overflow-y:auto; padding:8px 10px 14px; min-height:0; }
.teacher-student-group { margin-bottom:12px; }
.teacher-student-name { font-size:.75rem; font-weight:700; color:#5f4bdb; padding:4px 8px 6px; display:flex; align-items:center; gap:6px; }
.teacher-conv-item-wrap { display:flex; align-items:center; gap:2px; margin-bottom:4px; border-radius:14px; transition:.15s; }
.teacher-conv-item-wrap:hover { background:#faf8ff; }
.teacher-conv-item-wrap.active,
.teacher-conv-item-wrap:has(.teacher-conv-item.active) { background:#ede9fe; box-shadow:inset 3px 0 0 #5f4bdb; }
.teacher-conv-item { flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; text-align:left; border:none; background:transparent; border-radius:12px; padding:9px 10px; cursor:pointer; transition:.15s; }
.teacher-conv-item:hover { background:transparent; }
.teacher-conv-item .tci-title { display:block; width:100%; font-size:.86rem; font-weight:600; color:#2b2844; margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.teacher-conv-item .tci-meta { display:block; width:100%; font-size:.72rem; color:#999; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family:ui-monospace,monospace; }
.teacher-conv-remove { position:relative; margin-right:4px; }
.teacher-detail { flex:1; min-width:0; background:#fff; border-radius:22px; box-shadow:0 8px 24px rgba(95,75,219,.08); display:flex; flex-direction:column; overflow:hidden; min-height:0; }
.teacher-detail-empty { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#bbb; gap:8px; padding:24px; text-align:center; }
.teacher-detail-empty i { font-size:2.5rem; color:#ddd6fe; }
.teacher-detail-empty p { font-size:1rem; color:#888; margin:0; }
.teacher-detail-empty span { font-size:.82rem; color:#aaa; }
.teacher-detail-panel { flex:1; display:flex; flex-direction:column; min-height:0; overflow:hidden; }
.teacher-detail-head { padding:16px 20px; border-bottom:1px solid #f0edf5; flex-shrink:0; }
.teacher-detail-head .tdh-main { min-width:0; }
.teacher-detail-head h2 { font-size:1.05rem; color:#2b2844; margin-bottom:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.teacher-detail-head .tdh-sub { font-size:.85rem; color:#888; }
.teacher-detail-head .tdh-meta { display:flex; flex-wrap:wrap; gap:8px 12px; margin-top:10px; font-size:.75rem; color:#999; }
.teacher-detail-head .tdh-meta span { display:inline-flex; align-items:center; gap:5px; max-width:100%; }
.teacher-detail-head .tdh-id { font-family:ui-monospace,monospace; background:#f8f7fc; padding:4px 8px; border-radius:8px; max-width:min(100%,420px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.teacher-copy-id { margin-left:4px; border:none; background:transparent; color:#5f4bdb; cursor:pointer; padding:2px 6px; border-radius:6px; font-size:.72rem; }
.teacher-copy-id:hover { background:#ede9fe; }
.teacher-error { background:#fff0f0; color:#c0392b; border:1px solid #ffd6d6; border-radius:14px; padding:12px 16px; margin:12px 16px 0; flex-shrink:0; font-size:.88rem; }
.teacher-messages { display:flex; flex-direction:column; gap:14px; overflow-y:auto; padding:16px 20px 24px; flex:1; min-height:0; -webkit-overflow-scrolling:touch; }
.teacher-msg { border-radius:18px; padding:14px 16px; max-width:min(85%,720px); }
.teacher-msg.user { background:#ede9fe; align-self:flex-end; margin-left:auto; }
.teacher-msg.assistant { background:#f8f7fc; align-self:flex-start; border:1px solid #f0edf5; }
.teacher-msg.error { background:#fff5f5; border:1px solid #ffd6d6; align-self:flex-start; }
.teacher-msg-role { font-size:.75rem; font-weight:700; color:#5f4bdb; margin-bottom:6px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.teacher-quote-badge {
  display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:999px;
  font-size:.68rem; font-weight:600; line-height:1.2;
}
.teacher-quote-badge.is-yes { background:#ede9fe; color:#6d28d9; }
.teacher-quote-badge.is-no { background:#f3f4f6; color:#9ca3af; }
.teacher-quote-block {
  margin-bottom:10px; padding:10px 12px; border-radius:12px;
  background:#fff; border:1px dashed #c4b5fd; border-left:3px solid #8b5cf6;
}
.teacher-msg.user .teacher-quote-block { background:rgba(255,255,255,.72); }
.teacher-quote-head { font-size:.74rem; font-weight:700; color:#6d28d9; margin-bottom:6px; }
.teacher-quote-text { font-size:.82rem; line-height:1.55; color:#4b5563; white-space:pre-wrap; word-break:break-word; }
.teacher-quote-thumbs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px; }
.teacher-quote-thumb { width:52px; height:52px; border-radius:8px; object-fit:cover; border:1px solid #e5e7eb; display:block; }
.teacher-msg.error .teacher-msg-role { color:#e74c3c; }
.teacher-msg-body { font-size:.92rem; line-height:1.6; color:#333; white-space:pre-wrap; word-break:break-word; }
.teacher-msg-text { margin-bottom:4px; }
.teacher-msg-images { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.teacher-msg-img { display:block; max-width:min(100%,220px); max-height:220px; border-radius:12px; object-fit:cover; cursor:pointer; border:1px solid #eee; }
.teacher-msg-video { display:block; max-width:100%; border-radius:12px; margin-top:8px; }
.teacher-msg-audio { display:block; width:min(100%,360px); margin-top:8px; }
.teacher-action-tag { font-size:.68rem; background:#ddd6fe; color:#5f4bdb; padding:2px 8px; border-radius:10px; margin-left:6px; font-weight:600; }
.teacher-empty { color:#aaa; text-align:center; padding:24px; }
.teacher-sidebar-tabs { display:flex; gap:6px; padding:10px 12px 0; }
.teacher-tab { flex:1; border:none; background:#f8f7fc; color:#888; padding:9px 8px; border-radius:12px 12px 0 0; font-size:.8rem; font-weight:600; cursor:pointer; transition:.15s; }
.teacher-tab.active { background:#fff; color:#5f4bdb; box-shadow:0 -2px 0 #5f4bdb inset; }
.teacher-add-tip { margin-top:6px; font-size:.72rem; color:#aaa; line-height:1.4; }
.teacher-refresh-btn { flex-shrink:0; width:34px; height:34px; border:1px solid #e8e4f5; border-radius:10px; background:#fff; color:#5f4bdb; cursor:pointer; }
.teacher-refresh-btn:hover { background:#f5f3ff; }
.teacher-conv-pin { margin-right:4px; color:#5f4bdb; }
.teacher-creations { padding:12px 16px 0; border-bottom:1px solid #f0edf5; flex-shrink:0; }
.teacher-creations-head { font-size:.78rem; font-weight:700; color:#5f4bdb; margin-bottom:8px; }
.teacher-creations-grid { display:flex; flex-wrap:wrap; gap:8px; padding-bottom:12px; max-height:120px; overflow-y:auto; }
.teacher-creation-chip { background:#f8f7fc; border:1px solid #ede9fe; border-radius:12px; padding:8px 10px; font-size:.75rem; max-width:180px; }
.teacher-creation-chip img { display:block; max-width:100%; max-height:64px; border-radius:8px; margin-top:6px; object-fit:cover; }
.teacher-creation-chip .tcc-type { display:inline-block; background:#ddd6fe; color:#5f4bdb; padding:1px 6px; border-radius:8px; font-size:.65rem; margin-right:4px; }
.teacher-creation-chip .tcc-title { display:block; margin-top:4px; color:#555; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.teacher-ip-page { margin-top:8px; }
.teacher-ip-page summary { cursor:pointer; color:#5f4bdb; font-size:.82rem; }
.teacher-html-preview { margin-top:8px; max-height:200px; overflow:auto; background:#1e1e2e; color:#e0e0e0; padding:10px; border-radius:10px; font-size:.72rem; white-space:pre-wrap; word-break:break-all; }
@media (max-width: 860px) {
  .teacher-workspace { flex-direction:column; height:auto; min-height:calc(100vh - 96px); }
  .teacher-sidebar { width:100%; max-height:44vh; }
  .teacher-detail { min-height:52vh; }
  .teacher-id-lookup { flex-wrap:wrap; }
  .teacher-id-lookup .btn-sm-purple { width:100%; height:38px; }
}

/* IP 展示页生成 */
.ip-page-modal .ip-page-panel {
  max-width: min(980px, 96vw);
  width: 100%;
  max-height: 92vh;
}
.ip-page-hint {
  color: #888;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0 0 14px;
}
.ip-page-form .form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #666;
  margin: 0 0 6px;
}
.ip-page-prompt {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e0d6ff;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 56px;
  margin-bottom: 12px;
}
.ip-page-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
.ip-page-meta-row input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e0d6ff;
}
.ip-page-stats {
  font-size: 0.82rem;
  color: #9a93b8;
  margin: 4px 0 12px;
}
.ip-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.ip-page-module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  max-height: 140px;
  overflow-y: auto;
}
.ip-page-module-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #e8e0ff;
  background: #faf8ff;
  cursor: pointer;
  font-size: 0.82rem;
  transition: border-color 0.15s, background 0.15s;
}
.ip-page-module-chip input { display: none; }
.ip-page-module-chip.active {
  border-color: #5f4bdb;
  background: #f0ebff;
}
.ip-page-module-chip .ipm-name { font-weight: 600; color: #444; }
.ip-page-module-chip .ipm-desc { font-size: 0.72rem; color: #999; }
.ip-page-status {
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.ip-page-status-loading { background: #f0ebff; color: #5f4bdb; }
.ip-page-status-ok { background: #eefbf3; color: #2d8a56; }
.ip-page-status-err { background: #fff0f0; color: #c0392b; }
.ip-page-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.ip-page-preview-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-sm { padding: 6px 12px; font-size: 0.82rem; border-radius: 10px; }
.ip-page-preview-wrap {
  position: relative;
  border: 1px solid #e8e0ff;
  border-radius: 16px;
  background: #f5f3fa;
  min-height: 320px;
  overflow: hidden;
}
.ip-page-preview-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 0.9rem;
  margin: 0;
  pointer-events: none;
  z-index: 0;
}
.ip-page-preview-frame {
  width: 100%;
  height: min(52vh, 480px);
  border: 0;
  background: #fff;
  display: block;
  position: relative;
  z-index: 1;
}
.works-detail-actions .ip-page-action {
  background: linear-gradient(135deg, #6c5ce7, #5f4bdb);
  color: #fff;
  border: none;
}
@media (max-width: 640px) {
  .ip-page-meta-row { grid-template-columns: 1fr; }
  .ip-page-preview-frame { height: min(42vh, 360px); }
}

.ip-page-chat-result {
  margin-top: 8px;
  border: 1px solid #e8e0ff;
  border-radius: 16px;
  overflow: hidden;
  background: #faf8ff;
}
.ip-page-chat-badge {
  display: inline-block;
  background: #ede9fe;
  color: #5f4bdb;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  margin: 12px 12px 0;
  border-radius: 20px;
}
.ip-page-chat-meta,
.ip-page-chat-note {
  margin: 8px 12px 0;
  font-size: 0.84rem;
  color: #777;
  line-height: 1.5;
}
.ip-page-chat-preview-wrap {
  margin: 10px 12px 0;
  border: 1px solid #e0d6ff;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.ip-page-chat-frame {
  width: 100%;
  height: min(360px, 48vh);
  border: 0;
  display: block;
  background: #fff;
}
.ip-page-chat-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 12px;
}
.ip-page-shop-section {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px dashed #e0d6ff;
  border-radius: 14px;
  background: #faf8ff;
}
.ip-page-shop-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
}
.ip-shop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0ebff;
}
.ip-shop-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f5f3fa;
}
.ip-shop-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ip-shop-title {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #e8e0ff;
  border-radius: 8px;
  font-size: 0.82rem;
}
.ip-shop-category {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #e8e0ff;
  font-size: 0.8rem;
}
.ip-shop-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #888;
  flex-shrink: 0;
}

/* ===== 统一关闭按钮 ===== */
.ui-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1.5px solid #e8e0ff;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff 0%, #f8f6ff 100%);
  color: #9a93b8;
  font-size: 0.88rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(95, 75, 219, 0.08);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.ui-close-btn i {
  font-size: 0.82rem;
  pointer-events: none;
}
.ui-close-btn:hover {
  background: linear-gradient(145deg, #f0ebff 0%, #e8e0ff 100%);
  border-color: #c4b5fd;
  color: #5f4bdb;
  box-shadow: 0 4px 14px rgba(95, 75, 219, 0.18);
  transform: rotate(90deg) scale(1.06);
}
.ui-close-btn:active {
  transform: rotate(90deg) scale(0.94);
  box-shadow: 0 1px 4px rgba(95, 75, 219, 0.12);
}
.ui-close-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(95, 75, 219, 0.28);
}

.ui-close-btn--sm {
  width: 28px;
  height: 28px;
  font-size: 0.72rem;
  border-width: 1px;
}
.ui-close-btn--sm i { font-size: 0.68rem; }

.ui-close-btn--xs {
  width: 22px;
  height: 22px;
  font-size: 0.62rem;
  border-width: 1px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.ui-close-btn--xs i { font-size: 0.58rem; }
.ui-close-btn--xs:hover {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
  transform: scale(1.08);
}
.ui-close-btn--xs:active { transform: scale(0.92); }

.ui-close-btn--dark {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}
.ui-close-btn--dark:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.ui-close-btn--overlay {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 9700;
}

.creation-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
}

.kls-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}