/* AI 图文创作 #p27s0 · 布局与视觉
   对齐 _design_preview_20261119/tuwen-master 与 tuwen-ai-master：
   暖色画布 / 卡片 / 三步导轨 / 主栏 854 + 右栏 352 / 右栏吸顶。
   只做布局与外观覆盖，功能与交互沿用现有实现。 */

#p27s0{
  --tw-bg:#f2ebe2;
  --tw-card:#fffdfb;
  --tw-soft:#f7f0e7;
  --tw-line:#e8ded2;
  --tw-line-2:#efe3d5;
  --tw-ink:#1d1d20;
  --tw-mut:#716c66;
  --tw-faint:#9a9186;
  --tw-acc:#d64226;
  --tw-acc-ink:#a93822;
  --tw-acc-soft:#fbe9e2;
  --c-text-1:#1d1d20;
  --c-text-2:#5f574f;
  --c-text-3:#8f857c;
  color:var(--tw-ink);
}
body:has(#p27s0.act) .main,
body:has(#p27s0.act) .main-content{background:#f2ebe2!important}
body:has(#p27s0.act) .main-content{padding:24px 20px 60px!important}
body:has(#p27s0.act) .main-header{background:rgba(255,253,251,.92);border-bottom-color:#e8ded2!important}
body:has(#p27s0.act) #pageHead{display:none!important}
#p27s0{background:#f2ebe2;border-radius:18px}
#p27s0>.section{
  background:transparent!important;border:0!important;border-radius:0!important;
  padding:0!important;box-shadow:none!important;margin-bottom:0!important;
}

/* ---------- 页头：大标题 + kicker，不做外层卡片 ---------- */
#p27s0 .tw-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:24px;flex-wrap:wrap;
  margin:0 0 18px;padding:0;background:none;border:0;box-shadow:none;
}
#p27s0 .tw-kicker{
  display:inline-flex;align-items:center;gap:8px;
  color:#a54832;font-size:9px;font-weight:800;letter-spacing:.17em;
}
#p27s0 .tw-kicker::before{content:"";width:18px;height:1px;background:#d64226}
#p27s0 .tw-h1{
  margin:8px 0 0!important;color:#1d1d20;
  font-family:Georgia,"Noto Serif CJK SC","Songti SC",serif;
  font-size:34px;line-height:1.12;font-weight:800;letter-spacing:-.02em;
}
#p27s0 .tw-sub{margin:7px 0 0;font-size:12px;line-height:1.7;color:#716c66;max-width:640px}
#p27s0 .tw-head-side{display:flex;align-items:center;gap:8px;padding-bottom:3px}
#p27s0 .tw-pill{
  display:inline-flex;align-items:center;
  font-size:10px;font-weight:700;color:#a93822;background:#fbe9e2;
  border:1px solid #f0d9cf;border-radius:999px;padding:5px 10px;white-space:nowrap;
}

/* ---------- 顶部三步导轨 ---------- */
#p27s0 .tw-steps{
  display:flex;align-items:center;flex-wrap:wrap;gap:10px;
  padding:11px 16px;margin:0 0 14px;
  background:rgba(255,253,251,.86);border:1px solid #e8ded2;border-radius:16px;
  box-shadow:0 6px 18px rgba(78,52,34,.04);
}
#p27s0 .tw-step{display:inline-flex;align-items:center;gap:8px;flex:0 0 auto}
#p27s0 .tw-step>b{
  display:inline-flex;align-items:center;justify-content:center;
  width:24px;height:24px;flex:0 0 24px;border-radius:8px;
  background:#f7f3ee;border:1px solid #e5ddd4;color:#9a938b;
  font-family:Georgia,serif;font-size:10px;font-weight:700;line-height:1;
}
#p27s0 .tw-step>span{display:flex;flex-direction:column;min-width:0;line-height:1.25}
#p27s0 .tw-step strong{display:block;font-size:10.5px;font-weight:700;color:#8f8881;white-space:nowrap}
#p27s0 .tw-step em{display:block;font-style:normal;font-size:8.5px;color:#aaa39a;white-space:nowrap}
#p27s0 .tw-step.is-on>b{
  background:#1b1b1f;border-color:#1b1b1f;color:#fff;
  box-shadow:0 5px 13px rgba(27,27,31,.17);
}
#p27s0 .tw-step.is-on strong{color:#282529}
#p27s0 .tw-step.is-on em{color:#8f8881}
#p27s0 .tw-steps>i{
  flex:1 1 26px;min-width:20px;height:1px;font-style:normal;
  background:linear-gradient(90deg,#e7dfd6,#f2ede6);
}
#p27s0 .tw-flow{margin-left:auto;font-size:9px;color:#9a9186;white-space:nowrap}

/* ---------- 主栏 / 右栏 ---------- */
#p27s0 .tw-cols{
  grid-template-columns:minmax(0,854px) 352px;
  column-gap:14px;justify-content:space-between;align-items:start;
}
#p27s0 .mdh-col-main{min-width:0}
#p27s0 .mdh-col-side{
  position:sticky;top:20px;align-self:start;
  max-height:calc(100vh - 40px);overflow-y:auto;overflow-x:hidden;
  scrollbar-width:thin;scrollbar-color:#d9c9b8 transparent;padding-right:2px;
}
#p27s0 .mdh-col-side::-webkit-scrollbar{width:6px}
#p27s0 .mdh-col-side::-webkit-scrollbar-thumb{background:#d9c9b8;border-radius:99px}

/* ---------- 卡片与表单：暖色层次 ---------- */
#p27s0 .card{
  background:#fffdfb!important;border:1px solid #e8ded2!important;
  border-radius:16px!important;box-shadow:0 14px 34px -30px rgba(74,48,32,.5)!important;
}
#p27s0 .tw-import-card{
  background:#fbf6f0!important;border-color:#eadfd3!important;
}
#p27s0 input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
#p27s0 select,#p27s0 textarea{
  border-color:#e8ded2!important;background-color:#fffdfb!important;color:#1d1d20;
}
#p27s0 input:focus,#p27s0 select:focus,#p27s0 textarea:focus{
  border-color:#dfae97!important;box-shadow:0 0 0 3px #fbe9e1;
}
#p27s0 #tuwenImageDuration{height:34px!important;border-radius:9px!important;padding:0 10px!important;font-size:11.5px!important}
#p27s0 #tuwenText{
  min-height:132px;border-radius:10px!important;padding:10px 11px!important;
  font-size:12.5px!important;line-height:1.7!important;
}
#p27s0 .ks-label{font-size:10.5px!important;font-weight:750;color:#6f665d!important}
#p27s0 .btn-out{border-color:#e4d7c9!important;color:#6b6259!important;background:#fffdfb!important}
#p27s0 .btn-out:hover{border-color:#d9c3b3!important;background:#fffaf5!important;color:#a93822!important}
#p27s0 .btn-pri{
  background:linear-gradient(135deg,#c25532,#a33820)!important;
  border-color:#a33820!important;color:#fff!important;
  box-shadow:0 10px 22px -14px rgba(163,56,32,.9)!important;
}
#p27s0 .btn-pri:hover{background:linear-gradient(135deg,#b94f2d,#953019)!important}
#p27s0 .mdh-cta{height:40px!important;border-radius:10px!important;font-size:13px!important;font-weight:700}
#p27s0 [style*="#94a3b8"]{color:#9a9186!important}
#p27s0 [style*="#475569"]{color:#6b6259!important}

/* 素材 / AI 漫画分段切换 */
#p27s0 .tw-seg{
  display:inline-flex;padding:2px;gap:2px;
  background:#f4ece2;border:1px solid #eadfd3;border-radius:9px;
}
#p27s0 .tw-seg-btn{
  border:0;background:transparent;color:#8f857c;
  font-family:inherit;font-size:9.5px;font-weight:700;height:26px;padding:0 9px;
  border-radius:7px;cursor:pointer;white-space:nowrap;
}
#p27s0 .tw-seg-btn:hover{color:#a93822}
#p27s0 .tw-seg-btn.is-on{
  background:#fffdfb;color:#a93822;box-shadow:0 2px 6px rgba(74,48,32,.08);
}

/* ---------- 素材缩略图 ---------- */
#p27s0 #tuwenImageList{
  grid-template-columns:repeat(auto-fill,minmax(112px,1fr))!important;
  gap:8px!important;max-height:46vh;min-height:70px;
}
#p27s0 #tuwenImageList .vv-clip-card{
  border:1px solid #e9dfd4!important;border-radius:10px!important;
  background:#fffdfb!important;
}
#p27s0 #tuwenImageList .vv-clip-card img{height:118px!important;background:#f7f0e7!important}
#p27s0 #tuwenImageList .vv-clip-card>div>div{color:#3d3936!important;font-size:11px!important}
#p27s0 #tuwenImageList .vv-clip-card button[onclick^="moveTuwenImage"]{
  background:#f7f0e7!important;color:#a93822!important;
}
#p27s0 #tuwenImageList .vv-clip-card button[onclick^="removeTuwenImage"]{
  background:rgba(169,56,34,.82)!important;
}
#p27s0 #tuwenImageList .vv-clip-card select{border-radius:7px!important;font-size:10.5px!important}

/* ---------- 画面样式（AI 漫画） ---------- */
#p27s0 .tw-style-grid{display:flex;gap:8px;overflow-x:auto;padding:2px 0 8px;scrollbar-width:thin;scrollbar-color:#d9c9b8 transparent}
#p27s0 .tw-style-grid::-webkit-scrollbar{height:6px}
#p27s0 .tw-style-grid::-webkit-scrollbar-thumb{background:#d9c9b8;border-radius:99px}
#p27s0 .tw-style-card{
  flex:0 0 auto;width:132px;border:1px solid #e9e2d9;border-radius:11px;
  background:#fffdfb;padding:6px;cursor:pointer;
  transition:border-color .15s,box-shadow .15s,background .15s;
}
#p27s0 .tw-style-card:hover{border-color:#dcc9b9;background:#fffaf5}
#p27s0 .tw-style-card.is-on{border-color:#d64226;box-shadow:0 0 0 2px rgba(214,66,38,.10);background:#fff8f4}
#p27s0 .tw-style-thumb{width:100%;height:74px;border-radius:8px;overflow:hidden;background:#eadfd3;margin-bottom:5px}
#p27s0 .tw-style-thumb img{width:100%;height:100%;object-fit:cover;display:block}
#p27s0 .tw-style-name{font-size:10.5px;font-weight:700;color:#3d3936;line-height:1.35;margin-bottom:1px}
#p27s0 .tw-style-desc{font-size:9.5px;color:#9a9186;line-height:1.4;max-height:27px;overflow:hidden}

/* ---------- AI 漫画区头 ---------- */
#p27s0 .tw-ai-head{display:flex;align-items:flex-start;gap:10px;margin-bottom:12px}
#p27s0 .tw-step-num{
  width:24px;height:24px;flex:0 0 24px;border-radius:8px;
  background:#fbe9e2;color:#a93822;font-family:Georgia,serif;
  font-size:9.5px;font-weight:800;line-height:24px;text-align:center;margin-top:1px;
}
#p27s0 .tw-ai-head h3{margin:0;font-size:13px;font-weight:800;color:#282529;letter-spacing:-.01em}
#p27s0 .tw-ai-head p{margin:3px 0 0;font-size:10px;color:#8f857c;line-height:1.5}
#p27s0 .tw-ai-count{
  margin-left:auto;flex:0 0 auto;font-size:9.5px;font-weight:700;color:#a93822;
  background:#fbe9e2;border:1px solid #f0d9cf;border-radius:999px;padding:4px 9px;white-space:nowrap;
}

/* ---------- 分镜 6 格 ---------- */
#p27s0 .tw-shot-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:8px!important;margin-top:12px!important}
#p27s0 .tw-shot{
  border:1px solid #e9e2d9!important;border-radius:11px!important;
  background:#fffdfb!important;padding:5px!important;gap:5px!important;
}
#p27s0 .tw-shot:hover{border-color:#dcc9b9!important;box-shadow:0 6px 16px -14px rgba(74,48,32,.6)}
#p27s0 .tw-shot-img{border-radius:8px!important;background:#eadfd3!important}
#p27s0 .tw-shot-txt{font-size:9.5px!important;color:#6b6259!important;line-height:1.4!important;max-height:40px!important}
#p27s0 .tw-shot-ops{gap:4px!important}
#p27s0 .tw-shot-ops .btn{
  height:22px!important;padding:0 6px!important;font-size:9px!important;
  border-radius:6px!important;border-color:#e8ded2!important;color:#8f5b47!important;background:#fffdfb!important;
}
#p27s0 .tw-shot-ops .btn:hover{background:#fbe9e2!important;color:#a93822!important;border-color:#eccfbe!important}
#p27s0 .tw-shot-warn{font-size:9px!important;color:#b4462b!important}

/* ---------- 右侧成片设置 ---------- */
#p27s0 .tw-side-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin:0 0 10px;padding:2px 2px 0}
#p27s0 .tw-side-head h3{margin:0;font-size:13px;font-weight:800;color:#282529;letter-spacing:-.01em}
#p27s0 .tw-side-head p{margin:3px 0 0;font-size:9px;color:#9a9186}
#p27s0 .tw-ratio{
  font-size:9px;font-weight:700;color:#a93822;background:#fbe9e2;
  border:1px solid #f0d9cf;border-radius:999px;padding:3px 8px;white-space:nowrap;
}
#p27s0 .tw-side-card{padding:14px!important}

/* 字幕模板：横向滚动的小卡片，缩略图用数字人底图 */
#p27s0 #tuwenTemplateCards{
  display:flex!important;flex-wrap:nowrap!important;gap:8px!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  padding:2px 2px 7px!important;align-items:flex-start;
  scrollbar-width:thin;scrollbar-color:#d9c9b8 transparent;
}
#p27s0 #tuwenTemplateCards::-webkit-scrollbar{height:6px}
#p27s0 #tuwenTemplateCards::-webkit-scrollbar-thumb{background:#d9c9b8;border-radius:99px}
#p27s0 #tuwenTemplateCards .ks-tpl-card{
  flex:0 0 98px!important;width:98px!important;height:auto!important;
  display:flex!important;flex-direction:column;align-items:stretch;
  padding:4px!important;margin:0!important;
  border:1px solid #ece2d7!important;border-radius:10px!important;
  background:#fffdfb!important;box-shadow:none!important;overflow:hidden;cursor:pointer;
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
#p27s0 #tuwenTemplateCards .ks-tpl-card:hover{border-color:#dcc9b9!important;background:#fffaf5!important}
#p27s0 #tuwenTemplateCards .ks-tpl-card.active{
  border-color:#d64226!important;background:#fff8f4!important;box-shadow:0 0 0 2px #f6ddd1!important;
}
#p27s0 #tuwenTemplateCards .dh-tpl-thumb{
  width:88px!important;height:150px!important;border-radius:7px!important;flex:0 0 auto;
  background-image:linear-gradient(180deg,rgba(22,14,9,.20) 0%,rgba(22,14,9,.04) 34%,rgba(22,14,9,.30) 64%,rgba(22,14,9,.66) 100%),var(--tpl-bg)!important;
  background-size:cover!important;background-position:50% 18%!important;background-repeat:no-repeat!important;
  background-color:#cbb5a1!important;
}
#p27s0 #tuwenTemplateCards .ks-tpl-card>div:not(.dh-tpl-thumb){
  margin-top:5px!important;max-width:none!important;font-size:10px!important;font-weight:700!important;
  color:#5f574f!important;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#p27s0 #tuwenTemplateCards .ks-tpl-card.active>div:not(.dh-tpl-thumb){color:#b23a22!important}

/* 背景音乐：设计稿的紧凑行列表 */
#p27s0 #tuwenBGMList{
  display:flex!important;flex-direction:column!important;gap:0!important;
  max-height:216px!important;overflow-y:auto!important;overflow-x:hidden!important;
  padding:0!important;border:1px solid #efe3d5;border-radius:11px;background:#fbf6f0;
  scrollbar-width:thin;scrollbar-color:#d9c9b8 transparent;
}
#p27s0 #tuwenBGMList::-webkit-scrollbar{width:6px}
#p27s0 #tuwenBGMList::-webkit-scrollbar-thumb{background:#d9c9b8;border-radius:99px}
#p27s0 #tuwenBGMList [data-card]{
  width:100%!important;flex:0 0 auto!important;flex-direction:row!important;
  align-items:center!important;gap:8px!important;margin:0!important;
  padding:7px 9px!important;border:0!important;border-top:1px solid #f1e7dc!important;
  border-radius:0!important;background:transparent!important;
}
#p27s0 #tuwenBGMList [data-card]:first-child{border-top:0!important}
#p27s0 #tuwenBGMList [data-card]:hover{background:#f7eee4!important}
#p27s0 #tuwenBGMList [data-card].is-on{background:#fbe9e2!important;box-shadow:inset 3px 0 0 #d64226}
#p27s0 #tuwenBGMList [data-card]>span:first-child{
  width:22px!important;height:22px!important;font-size:9px!important;
  background:#fffdfb!important;color:#a93822!important;border:1px solid #e5d5c6!important;
}
#p27s0 #tuwenBGMList [data-card]>span:nth-child(2){
  flex:1!important;min-width:0!important;text-align:left!important;
  font-size:10.5px!important;font-weight:700!important;color:#3d3936!important;
}
#p27s0 #tuwenBGMList .vv-bgm-play{
  flex:0 0 auto!important;background:#fbe9e2!important;color:#a93822!important;
  border-radius:6px!important;font-size:9px!important;padding:3px 7px!important;
}
#p27s0 #tuwenBGMVolumeRow span{color:#6b6259!important}
#p27s0 #tuwenBGMVolume{accent-color:#c25532}

/* 右侧摘要 */
#p27s0 .tw-summary{
  display:grid;grid-template-columns:repeat(3,1fr);gap:6px;
  margin:12px 0 0;padding:10px 0;
  border-top:1px dashed #eadfd3;border-bottom:1px dashed #eadfd3;
}
#p27s0 .tw-summary>div{text-align:center;border-left:1px solid #f0e7dc}
#p27s0 .tw-summary>div:first-child{border-left:0}
#p27s0 .tw-summary b{display:block;font-family:Georgia,serif;font-size:14px;color:#1d1d20;line-height:1.2}
#p27s0 .tw-summary span{display:block;margin-top:2px;font-size:8.5px;color:#9a9186}

/* 状态与提示文字 */
#p27s0 .t11,#p27s0 .t12{line-height:1.6}
#p27s0 .c-muted{color:#8f857c!important}
#p27s0 #tuwenUploadStatus,#p27s0 #tuwenStoryStatus,#p27s0 #tuwenGenStatus,#p27s0 #tuwenStoryComposeHint{color:#8f857c}
#p27s0 .vv-done-badge{color:#3d7a53}

/* ---------- AI 漫画：漫画画面卡头 / 漫画卡 ---------- */
#p27s0 .tw-ai-head{justify-content:space-between;gap:12px;margin-bottom:12px}
#p27s0 .tw-ct{display:flex;align-items:flex-start;gap:9px;min-width:0}
#p27s0 .tw-num{
  width:24px;height:24px;flex:0 0 24px;border-radius:8px;
  background:#fbe9e2;color:#a93822;font-family:Georgia,serif;
  font-size:9.5px;font-weight:800;line-height:24px;text-align:center;margin-top:1px;
}
#p27s0 .tw-ct h3{margin:0;font-size:13px;font-weight:800;color:#282529;letter-spacing:-.01em}
#p27s0 .tw-ct p{margin:3px 0 0;font-size:10px;color:#8f857c;line-height:1.55}
#p27s0 .tw-head-acts{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex:0 0 auto;flex-wrap:wrap}
#p27s0 .tw-count{
  font-size:9px;font-weight:700;color:#a93822;background:#fbe9e2;
  border:1px solid #f0d9cf;border-radius:999px;padding:4px 9px;white-space:nowrap;
}
#p27s0 .tw-head-acts .btn{height:26px;padding:0 9px;font-size:9.5px;border-radius:7px}
#p27s0 .tw-genbar{margin:0 0 2px}
#p27s0 .tw-genbar:empty{display:none}
#p27s0 .tw-genbar .gen-bar{
  padding:8px 10px!important;border:1px solid #efe3d5!important;border-radius:9px!important;
  background:#fbf6f0!important;box-shadow:none!important;
}
#p27s0 .tw-genbar .gb-title{font-size:10px!important;color:#3d3936!important}
#p27s0 .tw-genbar .gb-sub{font-size:9px!important;color:#9a9186!important}
#p27s0 .tw-hintline{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;font-size:9px;color:#9a9186}
#p27s0 .tw-shot-img{position:relative!important}
#p27s0 .tw-shot-no,#p27s0 .tw-shot-st{
  position:absolute;z-index:2;top:5px;border-radius:999px;
  font-size:7.5px;font-weight:800;line-height:1;padding:3px 5px;
}
#p27s0 .tw-shot-no{left:5px;background:rgba(29,25,23,.62);color:#fff;letter-spacing:.04em}
#p27s0 .tw-shot-st{right:5px;background:rgba(255,253,251,.92);color:#3d7a53;border:1px solid rgba(255,255,255,.7)}
#p27s0 .tw-shot-st.is-busy{color:#a93822;background:#fbe9e2}
#p27s0 .tw-shot-st.is-blocked{color:#b4462b;background:#fdece7}

/* ---------- AI 漫画：右侧漫画设置 ---------- */
#p27s0 .tw-ai-settings .tw-field + .tw-field{margin-top:13px;padding-top:12px;border-top:1px dashed #efe3d5}
#p27s0 .tw-field-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;font-size:10px;font-weight:800;color:#3d3936}
#p27s0 .tw-field-head em{font-style:normal;font-size:8.5px;font-weight:600;color:#9a9186}
#p27s0 .tw-field-label{font-size:10px;font-weight:800;color:#3d3936;margin-bottom:6px}
#p27s0 .tw-field-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
#p27s0 .tw-stepper{
  display:flex;align-items:center;justify-content:space-between;
  height:34px;padding:3px;border:1px solid #e8ded2;border-radius:9px;background:#fbf6f0;
}
#p27s0 .tw-stepper button{
  width:26px;height:26px;flex:0 0 26px;border:0;border-radius:7px;cursor:pointer;
  background:#fffdfb;color:#a93822;font-size:14px;line-height:1;
  box-shadow:0 1px 2px rgba(74,48,32,.07);
}
#p27s0 .tw-stepper button:hover{background:#fbe9e2}
#p27s0 .tw-stepper b{font-family:Georgia,serif;font-size:13px;font-weight:700;color:#1d1d20;min-width:40px;text-align:center}
#p27s0 .tw-fontchips{display:flex;gap:6px;flex-wrap:wrap}
#p27s0 .tw-fontchips button{
  height:28px;padding:0 10px;border:1px solid #e8ded2;border-radius:8px;
  background:#fbf6f0;color:#6f665d;font-size:10px;font-weight:700;cursor:pointer;
}
#p27s0 .tw-fontchips button:hover{border-color:#dcc9b9;background:#fffaf5}
#p27s0 .tw-fontchips button.is-on{background:#fbe9e2;border-color:#e9c6b9;color:#a93822;box-shadow:0 0 0 2px rgba(214,66,38,.07)}
#p27s0.tw-ai-mode #tuwenDurationRow{display:none!important}
#p27s0 #tuwenAiSettings .tw-style-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;overflow:visible!important;padding:0!important;
}
#p27s0 #tuwenAiSettings .tw-style-card{
  width:auto!important;padding:6px!important;border-radius:10px!important;
  background:#fbf6f0!important;border-color:#efe3d5!important;box-shadow:none!important;
}
#p27s0 #tuwenAiSettings .tw-style-card.is-on{background:#fff8f4!important;border-color:#d64226!important;box-shadow:0 0 0 2px rgba(214,66,38,.10)!important}
#p27s0 #tuwenAiSettings .tw-style-thumb{height:58px!important;border-radius:7px!important;margin-bottom:5px!important}
#p27s0 #tuwenAiSettings .tw-style-name{font-size:9.5px!important;color:#3d3936!important;margin-bottom:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#p27s0 #tuwenAiSettings .tw-style-desc{display:none!important}

/* ---------- 响应式 ---------- */
@media(max-width:1280px){
  #p27s0 .tw-cols{grid-template-columns:minmax(0,1fr) 330px}
  #p27s0 .tw-shot-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:1180px){
  #p27s0 .tw-cols{grid-template-columns:minmax(0,1fr)}
  #p27s0 .mdh-col-side{position:static;max-height:none;overflow:visible;padding-right:0}
  #p27s0 .tw-flow{display:none}
}
@media(max-width:980px){#p27s0 .tw-shot-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:640px){
  body:has(#p27s0.act) .main-content{padding:18px 14px 48px!important}
  #p27s0 .tw-h1{font-size:28px}
  #p27s0 .tw-steps{padding:9px 10px;gap:7px}
  #p27s0 .tw-step em{display:none}
  #p27s0 .tw-steps>i{min-width:10px}
  #p27s0 .tw-head{gap:10px}
  #p27s0 .tw-seg{width:100%}
  #p27s0 .tw-seg-btn{flex:1}
  #p27s0 .tw-shot-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #p27s0 #tuwenImageList{grid-template-columns:repeat(auto-fill,minmax(104px,1fr))!important}
}

/* ---------- p27s1 AI图文作品：暖色作品库 ---------- */
body:has(#p27s1.act) #pageHead{display:none!important}
body:has(#p27s1.act) .main,body:has(#p27s1.act) .main-content{background:#f2ebe2!important}
body:has(#p27s1.act) .main-header{background:rgba(255,253,251,.92);border-bottom-color:#e8ded2!important}
#p27s1{background:#f2ebe2;border-radius:18px}
#p27s1>.section{background:transparent!important;border:0!important;border-radius:0!important;padding:0!important;box-shadow:none!important}

#p27s1 .lib-head{margin:0 0 18px;padding:0;background:none;border:0}
#p27s1 .lib-head-top{display:none}
#p27s1 .lib-head-row{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;min-width:0}
#p27s1 .lib-head-ic{display:none}
#p27s1 .lib-head-tx{flex:1 1 auto;min-width:0}
#p27s1 .lib-head-tx::before{
  content:"WORKS · 图文作品";display:block;margin-bottom:8px;padding-left:26px;
  color:#a54832;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:9px;line-height:1.6;font-weight:800;letter-spacing:.17em;
  background:linear-gradient(#d64226,#d64226) 0 50%/18px 1px no-repeat;
}
#p27s1 .lib-head-name{
  font-family:Georgia,"Noto Serif CJK SC","Songti SC",serif;
  font-size:34px;line-height:1.12;font-weight:800;letter-spacing:-.02em;color:#1d1d20;
}
#p27s1 .lib-head-desc{margin-top:6px;font-size:12px;line-height:1.7;color:#716c66}
#p27s1 .lib-head-act{gap:10px;padding-bottom:2px}
#p27s1 .lib-count{
  height:27px;padding:0 11px;border-radius:999px;background:#f7f0e7;color:#a93822;
  border:1px solid #e8ded2;font-size:10.5px;font-weight:700;
}
#p27s1 .lib-sort{
  height:30px;padding:0 10px;border:1px solid #e8ded2;border-radius:9px;background:#fffdfb;
  color:#6b6259;font-size:10.5px;font-weight:600;cursor:pointer;outline:none;
}
#p27s1 .lib-sort:focus{border-color:#d9b6a6;box-shadow:0 0 0 3px rgba(194,85,50,.10)}

#p27s1 .vv-result-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;overflow:visible;align-content:start}
#p27s1 .vv-thumb{
  display:flex;flex-direction:column;padding:9px;background:#fffdfb;
  border:1px solid #e9e2d9;border-radius:14px;box-shadow:0 12px 28px -28px rgba(74,48,32,.45);
  transition:border-color .16s,box-shadow .16s,transform .16s;
}
#p27s1 .vv-thumb:hover{border-color:#dcc9b9;transform:translateY(-2px);box-shadow:0 16px 30px -24px rgba(74,48,32,.5)}
#p27s1 .vv-thumb>img{aspect-ratio:9/16!important;border-radius:9px!important;background:#e7d9c9!important}
#p27s1 .vv-thumb-info{padding:9px 2px 0;background:transparent;min-height:56px;display:flex;flex-direction:column;gap:4px}
#p27s1 .vv-thumb-name{
  font-size:11.5px;line-height:1.45;font-weight:700;color:#1d1d20;white-space:normal;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
#p27s1 .ai-tag{background:#fbe9e2;color:#a93822;font-size:9px;line-height:15px;margin-left:5px}
#p27s1 .vv-thumb-meta{
  display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:auto;
  font-size:9.5px;line-height:1.4;color:#9a9186;
}
#p27s1 .vv-thumb-meta .ks-work-dur{
  display:inline-flex;align-items:center;height:17px;padding:0 6px;border-radius:5px;
  background:#f7f0e7;color:#8a6a4f;font-size:9px;font-weight:700;
}
#p27s1 .vv-thumb-meta .ks-work-dur::before{content:"";width:4px;height:4px;border-radius:50%;background:#c25532;margin-right:4px}
#p27s1 .vv-thumb-actions{display:flex;gap:5px;padding:8px 0 0;margin-top:auto;background:transparent}
#p27s1 .vv-thumb-act{
  flex:1 1 0;min-width:0;height:26px;padding:0 5px;border:1px solid #e8ded2;border-radius:7px;
  background:#fffdfb;color:#6b6259;font-size:9.5px;font-weight:700;gap:4px;cursor:pointer;
}
#p27s1 .vv-thumb-act .ic{width:12px;height:12px}
#p27s1 .vv-thumb-act:hover{background:#fbe9e2;border-color:#e5c4b8;color:#a93822}
#p27s1 .vv-thumb-del{top:15px;right:15px;background:rgba(29,29,32,.55);border-radius:8px}
#p27s1 .vv-thumb-del:hover{background:#c25532}

#p27s1 .lib-empty{
  padding:44px 24px;border:1px dashed #e2d3c4;border-radius:14px;
  background:linear-gradient(180deg,#fffdfb,#faf5ef);
}
#p27s1 .lib-empty-ic{background:#f7f0e7;color:#a93822;border:1px solid #e8ded2}
#p27s1 .lib-empty-t{color:#1d1d20}
#p27s1 .lib-empty-d{color:#8f857c;font-size:11.5px}
#p27s1 .lib-empty .btn-pri{background:linear-gradient(135deg,#c25532,#a33820);border-color:#a33820;color:#fff}
#p27s1 .lib-skel{grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
#p27s1 .lib-skel-i{background:#eadfd3;border-radius:14px;aspect-ratio:9/16!important}

body:has(#p27s1.act) .vv-preview-overlay{background:rgba(46,32,22,.55);backdrop-filter:blur(8px)}
body:has(#p27s1.act) #vvPreviewOverlay .vv-preview-box,
body:has(#p27s1.act) #dhPreviewOverlay .vv-preview-card{
  background:#fffdfb;border:1px solid #e9e2d9;border-radius:16px;
  box-shadow:0 28px 70px -30px rgba(61,38,22,.55);
}
body:has(#p27s1.act) #vvPreviewOverlay .vv-preview-hd,
body:has(#p27s1.act) #dhPreviewOverlay .vv-preview-header{
  background:#faf6f0;border-bottom:1px solid #efe3d5;color:#1d1d20;
}
body:has(#p27s1.act) #vvPreviewOverlay .vv-preview-close,
body:has(#p27s1.act) #dhPreviewOverlay .vv-preview-close{
  background:#f7f0e7;color:#716c66;border-radius:9px;border:1px solid #efe3d5;
}
body:has(#p27s1.act) #vvPreviewOverlay .vv-preview-close:hover,
body:has(#p27s1.act) #dhPreviewOverlay .vv-preview-close:hover{background:#c25532;color:#fff}
body:has(#p27s1.act) #vvPreviewOverlay .vv-preview-body{background:#1b1511}
body:has(#p27s1.act) #dhPreviewOverlay video{background:#1b1511}
body:has(#p27s1.act) #vvPreviewOverlay .vv-preview-ft,
body:has(#p27s1.act) #dhPreviewOverlay .vv-preview-actions{background:#faf6f0;border-top:1px solid #efe3d5}

@media(max-width:1300px){
  #p27s1 .vv-result-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  #p27s1 .lib-skel{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:1100px){
  #p27s1 .vv-result-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  #p27s1 .lib-skel{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:820px){
  #p27s1 .vv-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #p27s1 .lib-skel{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  #p27s1 .vv-result-grid{grid-template-columns:minmax(0,1fr)}
  #p27s1 .lib-skel{grid-template-columns:minmax(0,1fr)}
}

/* ---------- 说明文字收进「?」：hover / focus 展开 ---------- */
#p27s0 .tw-help{
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  width:16px;height:16px;flex:0 0 16px;margin-left:5px;border-radius:50%;
  border:1px solid #dccbba;background:#fbf6ef;color:#8d857d;
  font-size:10px;font-weight:800;line-height:1;cursor:help;user-select:none;vertical-align:1px;
}
#p27s0 .tw-help:hover,#p27s0 .tw-help:focus{background:#fbe9e2;border-color:#e3b7a4;color:#a93822;outline:none}
#p27s0 .tw-help::after{
  content:attr(data-tip);position:absolute;left:0;bottom:calc(100% + 9px);
  width:max-content;max-width:min(268px,calc(100vw - 44px));padding:8px 10px;
  border-radius:8px;background:#2b211b;color:#fff8f0;font-size:11px;font-weight:500;
  line-height:1.65;text-align:left;white-space:normal;box-shadow:0 10px 28px rgba(35,22,14,.26);
  opacity:0;visibility:hidden;transform:translate(0,4px);
  transition:opacity .14s,transform .14s,visibility .14s;z-index:90;pointer-events:none;
}
#p27s0 .tw-help::before{
  content:"";position:absolute;left:7px;bottom:calc(100% + 4px);width:8px;height:8px;
  background:#2b211b;transform:rotate(45deg);opacity:0;visibility:hidden;
  transition:opacity .14s,visibility .14s;z-index:91;
}
#p27s0 .tw-help:hover::after,#p27s0 .tw-help:focus::after{opacity:1;visibility:visible;transform:translate(0,0)}
#p27s0 .tw-help:hover::before,#p27s0 .tw-help:focus::before{opacity:1;visibility:visible}

/* 这些说明已收进 ?，不再占版面 */
#p27s0 #tuwenTextHintUpload,
#p27s0 #tuwenTextHintAi,
#p27s0 #tuwenImportHintOpt,
#p27s0 #tuwenImportHintRaw,
#p27s0 #tuwenFitHint{display:none!important}

/* p27s1 小修：排序框与分页按钮去冷灰 */
#p27s1 .lib-sort{border:1px solid #e8ded2!important;background:#fffdfb!important;color:#6b6259!important}
#p27s1 #tuwenWorkList_pager span{color:#9a9186!important}
#p27s1 #tuwenWorkList_pager .btn-out{color:#8f5b47!important;border-color:#e8ded2!important;background:#fffdfb!important}
#p27s1 #tuwenWorkList_pager .btn-out:hover:not(:disabled){background:#fbe9e2!important;border-color:#e5c4b8!important;color:#a93822!important}
#p27s1 #tuwenWorkList_pager .btn-out:disabled{opacity:.42}

/* 「?」提示改为 fixed 浮层，避免被卡片 overflow / 侧栏滚动裁切 */
#p27s0 .tw-help::after,#p27s0 .tw-help::before{display:none!important}
#twHelpTip{
  position:fixed;left:0;top:0;z-index:2147483000;max-width:min(268px,calc(100vw - 24px));
  padding:8px 10px;border-radius:8px;background:#2b211b;color:#fff8f0;
  font-size:11px;font-weight:500;line-height:1.65;text-align:left;
  box-shadow:0 10px 28px rgba(35,22,14,.26);opacity:0;visibility:hidden;
  transform:translateY(4px);transition:opacity .12s,transform .12s,visibility .12s;
  pointer-events:none;white-space:normal;
}
#twHelpTip.is-on{opacity:1;visibility:visible;transform:none}
