/* ---------- 首页外壳：侧栏 + 主区域 ---------- */
#home { display: flex; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); --side: 220px; --glow: rgba(45, 212, 191, .16); }
#home.folded { --side: 68px; }
.sh-side { flex: none; width: var(--side); display: flex; flex-direction: column; padding: 16px 12px; gap: 6px;
  background: var(--bg2); border-right: 1px solid var(--line); transition: width .18s; overflow: hidden; }
.sh-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: auto; padding: 12px 8px 10px; margin-bottom: 12px; font-size: 16px; white-space: nowrap; text-align: center; }
.sh-brand .logo, .sh-brand .logo-img { flex: none; width: 92px; height: 92px; border-radius: 20px; object-fit: cover; }
.sh-brand .logo-img { cursor: zoom-in; transition: transform .18s ease, box-shadow .18s ease; }
.sh-brand .logo-img:hover { transform: scale(1.05); box-shadow: 0 0 0 2px rgba(45, 212, 191, .38), 0 12px 28px -14px rgba(45, 212, 191, .85); }
.sh-brand .logo-img:active { transform: scale(1.01); }
.sh-nav .nav-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: hsla(var(--h, 170), 72%, 55%, .13); color: hsl(var(--h, 170), 72%, 62%);
  box-shadow: inset 0 0 0 1px hsla(var(--h, 170), 72%, 55%, .1);
  transition: background .15s, color .15s, transform .15s; }
.sh-nav .nav-ic .ic { stroke-width: 2; }
.sh-nav [data-nav]:hover .nav-ic { background: hsla(var(--h, 170), 72%, 55%, .22); transform: translateY(-1px); }
.sh-nav [data-nav].on .nav-ic { color: #fff; background: linear-gradient(135deg, hsl(var(--h, 170), 75%, 55%), hsl(calc(var(--h, 170) + 28), 75%, 50%)); box-shadow: 0 6px 16px hsla(var(--h, 170), 70%, 50%, .3); }
.sh-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sh-nav [data-nav] { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 11px; border: 0; border-radius: 10px;
  background: transparent; color: var(--dim); text-decoration: none; font-size: 14px; white-space: nowrap; text-align: left; }
.sh-nav [data-nav]:hover { background: var(--panel2); color: var(--text); }
.sh-nav [data-nav].on { background: var(--glow); color: var(--accent); font-weight: 600; }
.sh-badge { margin-left: auto; padding: 1px 6px; border-radius: 6px; font: 700 10px/16px system-ui, sans-serif; font-style: normal;
  color: #fff; background: linear-gradient(90deg, #fb923c, #f43f5e); }
.sh-sep { height: 1px; margin: 8px 10px; background: var(--line); }
.sh-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.sh-foot .badge { align-self: flex-start; margin-left: 4px; font: inherit; font-size: 12px; cursor: pointer; }
.sh-foot-row { display: flex; gap: 4px; }
.folded .sh-nav span, .folded .sh-brand b, .folded .sh-badge, .folded .sh-foot .badge { display: none; }
.folded .sh-nav [data-nav] { justify-content: center; padding: 0; }
.folded .sh-brand { height: 56px; padding: 0; }
.folded .sh-brand .logo, .folded .sh-brand .logo-img { width: 40px; height: 40px; border-radius: 11px; }
.folded .sh-foot-row { flex-direction: column; align-items: center; }
.sh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sh-view { flex: 1; overflow: auto; background: radial-gradient(900px 420px at 50% -120px, var(--glow), transparent 70%); }
.sh-banner { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 38px; padding: 6px 44px;
  position: relative; font-size: 13px; color: var(--text); background: linear-gradient(90deg, rgba(45, 212, 191, .14), rgba(167, 139, 250, .14)); border-bottom: 1px solid var(--line); }
.sh-banner-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(45, 212, 191, .2); }
.sh-banner-go { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 0 4px; }
.sh-banner-go:hover { text-decoration: underline; }
.sh-banner-x { position: absolute; right: 10px; width: 26px; height: 26px; }
.sh-help { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line2); background: var(--panel); color: var(--dim); box-shadow: var(--shadow); }
.sh-help:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 960px) {
  #home { --side: 68px; }
  #home .sh-nav span, #home .sh-brand b, #home .sh-badge, #home .sh-foot .badge { display: none; }
  #home .sh-nav [data-nav] { justify-content: center; padding: 0; }
  #home .sh-brand { height: 56px; padding: 0; }
  #home .sh-brand .logo, #home .sh-brand .logo-img { width: 40px; height: 40px; border-radius: 11px; }
  #home .sh-foot-row { flex-direction: column; align-items: center; }
}

.sh-disc-tip { margin-bottom: 10px; font-size: 13px; color: var(--dim); }
.sh-disc-wrap { max-height: 60vh; overflow: auto; }
.sh-disc { width: 100%; border-collapse: collapse; font-size: 13px; }
.sh-disc th, .sh-disc td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.sh-disc th { color: var(--dim); font-weight: 500; position: sticky; top: 0; z-index: 2; background: var(--panel); box-shadow: inset 0 -1px 0 var(--line); }  /* 表头滚动时固定在顶部 */
.sh-disc td b { color: var(--accent); }
.disc-logo { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; margin-right: 7px;
  vertical-align: middle; background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.disc-logo svg { width: 15px; height: 15px; display: block; }
.disc-logo.ark svg { color: #1664ff; }
.disc-logo.openai svg { color: #10a37f; }
.disc-logo.custom svg { color: #64748b; }
.sh-disc-group td { padding: 10px 10px; font-weight: 600; color: var(--accent); background: rgba(45, 212, 191, .06); }
.sh-disc-empty { padding: 22px; text-align: center; color: var(--dim); }

/* ---------- 首页：标题 + 输入框 ---------- */
.hm-hero { max-width: 900px; margin: 0 auto; padding: 64px 32px 24px; text-align: center; }
.hm-hero h1 { margin: 0; font-size: 40px; line-height: 1.25; letter-spacing: 1px; font-weight: 800; }
.hm-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), #60a5fa 55%, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-hero > p { margin: 12px auto 30px; max-width: 620px; color: var(--dim); font-size: 14px; }
.hm-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--dim); text-decoration: none; font-size: 13px; }
.hm-link:hover { color: var(--accent); }
.cp { text-align: left; }
.cp-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.cp-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--dim); font-size: 14px; }
.cp-tabs button.on { background: var(--panel2); color: var(--text); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.cp-card { position: relative; border-radius: 18px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 18px 50px rgba(0, 0, 0, .28); transition: border-color .15s; }
.cp-card:focus-within, .cp-card.drop { border-color: var(--accent); }
.cp-top { display: flex; gap: 12px; padding: 16px 16px 4px; }
.cp-refs { flex: none; display: flex; flex-wrap: wrap; gap: 8px; max-width: 46%; align-content: flex-start; }
.cp-ref, .cp-add { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; }
.cp-ref { background: var(--bg2); border: 1px solid var(--line); }
.cp-ref img, .cp-ref video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-ref-audio { display: grid; place-items: center; height: 100%; color: var(--c-audio); }
.cp-ref-tag { position: absolute; left: 3px; bottom: 3px; padding: 0 5px; border: 0; border-radius: 5px; font-size: 10px; line-height: 16px; color: #fff; background: rgba(0, 0, 0, .6); }
.cp-ref-x { position: absolute; top: 3px; right: 3px; display: none; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, .65); }
.cp-ref:hover .cp-ref-x { display: grid; }
.cp-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px dashed var(--line2); background: transparent; color: var(--dim); font-size: 11px; }
.cp-add:hover { border-color: var(--accent); color: var(--accent); }
.cp-top textarea { flex: 1; min-width: 0; height: 88px; padding: 4px 26px 4px 2px; border: 0; outline: none; resize: none; background: transparent; font-size: 15px; line-height: 1.6; }
.cp-card.tall .cp-top textarea { height: 240px; }
.cp-top textarea::placeholder { color: var(--mute); }
.cp-tall { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; }
.cp-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px 12px 16px; flex-wrap: wrap; }
.cp-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); font-size: 12.5px; }
.cp-chip:hover:not(:disabled) { border-color: var(--accent); }
.cp-chip span { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-note { font-size: 12px; color: var(--c-video); }
.cp-grow { flex: 1; }
.cp-cost { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-size: 13px; }
.cp-send { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; color: #062420;
  background: linear-gradient(135deg, var(--accent), #60a5fa); box-shadow: 0 6px 18px rgba(45, 212, 191, .3); }
.cp-send:hover:not(:disabled) { filter: brightness(1.1); }

/* 参数弹出面板 */
.cp-pop { position: fixed; z-index: 200; width: 340px; max-width: calc(100vw - 24px); padding: 14px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow); animation: fade .12s; }
.cp-pl { margin: 12px 0 6px; font-size: 12px; color: var(--dim); }
.cp-pl:first-child { margin-top: 0; }
.cp-pl b { color: var(--text); font-weight: 600; margin-left: 4px; }
.cp-pl em { font-style: normal; margin-left: 8px; color: var(--mute); }
.cp-ratios { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.cp-ratios button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 54px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--bg2); color: var(--dim); font-size: 11px; }
.cp-ratios button.on { border-color: var(--accent); color: var(--accent); background: var(--glow); }
.cp-ratios.off { opacity: .5; }
.cp-rb { display: block; border: 1.5px solid currentColor; border-radius: 3px; }
.cp-rb.auto { width: 16px; height: 16px; border-style: dashed; }
.cp-seg { display: flex; gap: 4px; padding: 3px; border-radius: 9px; background: var(--bg2); }
.cp-seg button { flex: 1; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--dim); font-size: 12px; }
.cp-seg button.on { background: var(--panel2); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.cp-range { width: 100%; accent-color: var(--accent); }
.cp-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--mute); }

/* ---------- 首页：功能卡片 ---------- */
.hm-sec { max-width: 1200px; margin: 0 auto; padding: 22px 40px 10px; }
.hm-sec:last-child { padding-bottom: 80px; }
.hm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.hm-head h2 { margin: 0; font-size: 18px; }
.hm-head a { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); text-decoration: none; font-size: 13px; }
.hm-head a:hover { color: var(--accent); }
.hm-feat { display: grid; grid-template-columns: minmax(300px, 1fr) 2fr; gap: 16px; }
.hm-big { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.hm-big-art { position: relative; height: 200px; background-color: var(--bg2);
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 16px 16px; }
.hm-big-art::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(45, 212, 191, .22), transparent 60%), radial-gradient(circle at 85% 85%, rgba(167, 139, 250, .22), transparent 55%); }
.ga-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.ga-lines path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.ga-node { position: absolute; width: 26%; padding: 8px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); font-size: 11px; }
.ga-node i { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 6px; vertical-align: middle; color: var(--c-text); background: rgba(52, 211, 153, .15); }
.ga-node b { font-weight: 600; vertical-align: middle; }
.ga-node s { display: block; height: 5px; margin-top: 7px; border-radius: 3px; background: var(--line2); }
.ga-node s.short { width: 60%; }
.ga-node.n1 { left: 4%; top: 10%; }
.ga-node.n2 { left: 37%; top: 30%; animation: bob 3s ease-in-out infinite; }
.ga-node.n2 i { color: var(--c-image); background: rgba(96, 165, 250, .15); }
.ga-node.n3 { left: 70%; top: 50%; animation: bob 3s ease-in-out infinite 1.5s; }
.ga-node.n3 i { color: var(--c-video); background: rgba(167, 139, 250, .15); }
.ga-img { display: grid; place-items: center; height: 38px; margin-top: 7px; border-radius: 6px; color: #fff; background: linear-gradient(135deg, #2dd4bf, #60a5fa); }
.ga-img.v { background: linear-gradient(135deg, #a78bfa, #f472b6); }
@keyframes bob { 50% { transform: translateY(-5px); } }
.hm-big-text { padding: 18px 20px 20px; }
.hm-big-text h3 { margin: 8px 0 6px; font-size: 18px; }
.hm-big-text p { margin: 0 0 16px; color: var(--dim); }
.hm-tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11px; color: var(--accent); background: var(--glow); }
.hm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hm-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 150px; padding: 16px; border-radius: 14px; text-align: left;
  border: 1px solid var(--line); color: var(--text); overflow: hidden;
  background: linear-gradient(160deg, hsla(var(--h), 70%, 55%, .16), transparent 60%), var(--panel); transition: .15s; }
.hm-card:hover { transform: translateY(-2px); border-color: hsla(var(--h), 70%, 55%, .6); box-shadow: var(--shadow); }
.hm-card-ic { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 4px; border-radius: 11px; color: hsl(var(--h), 70%, 62%); background: hsla(var(--h), 70%, 55%, .16); }
.hm-card-t { font-size: 14px; font-weight: 600; }
.hm-card-d { color: var(--dim); font-size: 12px; line-height: 1.5; }
.hm-card-tag { margin-top: auto; font-size: 11px; color: var(--mute); }
@media (max-width: 1180px) { .hm-feat { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .hm-grid { grid-template-columns: repeat(2, 1fr); } .hm-sec { padding: 16px 20px; } .hm-hero h1 { font-size: 30px; } }

/* ---------- 子页面通用 ---------- */
.pg { max-width: 1240px; margin: 0 auto; padding: 36px 40px 90px; }
.pg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.pg-head h1 { margin: 0; font-size: 24px; }
.pg-head p { margin: 6px 0 0; color: var(--dim); }
.pg-sub { color: var(--mute); font-size: 12px; }
#home .day { display: flex; align-items: baseline; gap: 8px; }
#home .day span { color: var(--mute); font-size: 12px; font-weight: 400; }

/* 模板页 */
.tp-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 10px 0; margin-bottom: 4px;
  background: var(--bg); border-bottom: 1px solid var(--line); }
.tp-cats { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.tp-cats button, .wk-tabs button, .fb-kinds button, .fb-tabs button { height: 30px; padding: 0 14px; border-radius: 15px; border: 1px solid var(--line2); background: transparent; color: var(--dim); font-size: 13px; }
.tp-cats button:hover, .wk-tabs button:hover, .fb-kinds button:hover { color: var(--text); }
.tp-cats button.on, .wk-tabs button.on, .fb-kinds button.on, .fb-tabs button.on { border-color: var(--accent); color: var(--accent); background: var(--glow); }
.tp-search { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg2); color: var(--mute); }
.tp-search input { width: 150px; border: 0; outline: none; background: transparent; }
.tp-sec { display: flex; align-items: baseline; gap: 8px; margin: 26px 0 12px; font-size: 15px; }
.tp-sec span { color: var(--mute); font-size: 12px; font-weight: 400; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tp-grid.tall { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tp-card { display: flex; flex-direction: column; gap: 4px; padding: 0 0 12px; border-radius: 14px; overflow: hidden; text-align: left;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); transition: .15s; }
.tp-card:hover { transform: translateY(-2px); border-color: hsla(var(--h), 70%, 55%, .6); box-shadow: var(--shadow); }
.tp-cover { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; margin-bottom: 6px; color: hsl(var(--h), 70%, 70%);
  background: radial-gradient(circle at 25% 20%, hsla(var(--h), 80%, 60%, .45), transparent 60%), radial-gradient(circle at 85% 90%, hsla(calc(var(--h) + 50), 80%, 60%, .35), transparent 55%), var(--bg2); }
.tp-grid.tall .tp-cover { aspect-ratio: 3 / 4; }
.tp-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(0, 0, 0, .25); backdrop-filter: blur(4px); }
.tp-need { position: absolute; left: 8px; top: 8px; padding: 1px 7px; border-radius: 6px; font-size: 11px; color: #fff; background: rgba(0, 0, 0, .5); }
.tp-use { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 5px 14px; border-radius: 16px; font-size: 12px; font-weight: 600;
  color: #062420; background: var(--accent); opacity: 0; transition: .15s; white-space: nowrap; }
.tp-card:hover .tp-use { opacity: 1; }
.tp-t { padding: 0 12px; font-weight: 600; }
.tp-d { padding: 0 12px; color: var(--mute); font-size: 12px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.tp-card.has-media .tp-cover { background: var(--bg2); }
.tp-vid { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, .45); }
/* 视频创作顶部的工具卡片 */
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 0 0 22px; }
.tl-card { position: relative; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); background: var(--panel); transition: .15s; }
.tl-card:hover { transform: translateY(-2px); border-color: hsla(var(--h), 70%, 55%, .7); box-shadow: var(--shadow); }
.tl-cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; color: hsl(var(--h), 70%, 70%);
  background: radial-gradient(circle at 20% 20%, hsla(var(--h), 80%, 60%, .5), transparent 60%), radial-gradient(circle at 85% 90%, hsla(calc(var(--h) + 60), 80%, 60%, .4), transparent 55%), var(--bg2); }
.tl-info { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px 12px; }
.tl-info b { font-size: 15px; }
.tl-info em { font-style: normal; color: var(--mute); font-size: 12px; line-height: 1.5; }
#home[data-theme="light"] .tl-cover { color: hsl(var(--h), 60%, 38%); }
.tp-flows { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tf-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; text-align: left; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.tf-card:hover { border-color: var(--accent); }
.tf-chain { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.tf-chain i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--bg2); }
.tf-chain b { width: 12px; height: 1.5px; background: var(--line2); }
.tf-chain .t-text { color: var(--c-text); } .tf-chain .t-image { color: var(--c-image); } .tf-chain .t-video { color: var(--c-video); } .tf-chain .t-audio { color: var(--c-audio); }
.tf-t { font-weight: 600; }
.tf-t em { margin-left: 6px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-style: normal; color: var(--accent); background: var(--glow); }
.tf-d { color: var(--mute); font-size: 12px; }

/* 我的作品 */
.wk-tabs { display: flex; gap: 6px; margin-bottom: 4px; }
.wk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.wk-card { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.wk-card:hover { border-color: var(--line2); box-shadow: var(--shadow); }
.wk-cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg2); color: var(--mute); }
.wk-cover[data-view] { cursor: zoom-in; }
.wk-cover img, .wk-cover video { width: 100%; height: 100%; object-fit: cover; display: block; }
.wk-more, .wk-play { position: absolute; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .55); }
.wk-more { right: 8px; top: 8px; padding: 0 7px; border-radius: 6px; font-size: 11px; line-height: 18px; }
.wk-play { width: 34px; height: 34px; border-radius: 50%; }
.wk-text { padding: 14px; font-size: 12px; line-height: 1.6; color: var(--dim); align-self: start; overflow: hidden; }
.wk-info { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; }
.wk-row { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.wk-st { padding: 0 7px; border-radius: 6px; line-height: 18px; font-size: 11px; }
.wk-st.ok { color: #34d399; background: rgba(52, 211, 153, .14); }
.wk-st.run { color: #60a5fa; background: rgba(96, 165, 250, .14); }
.wk-st.bad { color: var(--danger); background: rgba(248, 113, 113, .14); }
.wk-kind { color: var(--dim); }
.wk-time { margin-left: auto; color: var(--mute); }
.wk-model { font-size: 12px; color: var(--dim); }
.wk-prompt { font-size: 12px; color: var(--mute); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.wk-act { display: flex; gap: 4px; margin-top: 4px; }
.wk-act button { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--dim); font-size: 12px; }
.wk-act button:hover { color: var(--accent); border-color: var(--accent); }
.wk-empty, .fb-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 70px 0; color: var(--mute); }
.wk-empty p, .fb-empty p { margin: 4px 0 10px; }

/* 意见反馈弹窗（挂在 body 上，跟随全局配色） */
:root { --glow: rgba(45, 212, 191, .16); }
.fb-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.fb-l { margin: 14px 0 6px; color: var(--dim); font-size: 12px; }
.fb-l:first-child { margin-top: 0; }
.fb-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-ta { position: relative; }
.fb-ta textarea { height: 130px; resize: vertical; padding-bottom: 22px; }
.fb-count { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: var(--mute); }
.fb-shots { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-shot, .fb-add { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; }
.fb-shot { border: 1px solid var(--line); cursor: zoom-in; }
.fb-shot img { width: 100%; height: 100%; object-fit: cover; }
.fb-shot button { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, .65); }
.fb-add { display: grid; place-items: center; border: 1px dashed var(--line2); background: transparent; color: var(--dim); }
.fb-add:hover { border-color: var(--accent); color: var(--accent); }
.fb-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; }
.fb-item { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); }
.fb-item p { margin: 8px 0; white-space: pre-wrap; word-break: break-word; }
.fb-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.fb-tag { padding: 0 7px; border-radius: 6px; line-height: 18px; color: var(--accent); background: var(--glow); }
.fb-st { color: var(--dim); }
.fb-time { margin-left: auto; color: var(--mute); }
.qs { margin: 0; padding-left: 20px; }
.qs li { margin-bottom: 12px; }
.qs p { margin: 2px 0 0; color: var(--dim); }

/* ---------- 浅色主题（只作用于首页外壳，画布编辑器保持深色） ---------- */
#home[data-theme="light"] {
  --bg: #f6f7f9; --bg2: #eef0f4; --panel: #ffffff; --panel2: #f1f3f6; --line: #e3e6eb; --line2: #d3d8e0;
  --text: #1c2230; --dim: #586273; --mute: #8a93a3; --accent: #0d9488; --glow: rgba(13, 148, 136, .1);
  --shadow: 0 10px 28px rgba(30, 40, 60, .12);
}
#home[data-theme="light"] .btn { background: #fff; }
#home[data-theme="light"] .btn:hover:not(:disabled) { background: #f1f3f6; border-color: #c3c9d3; }
#home[data-theme="light"] .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
#home[data-theme="light"] .icon-btn:hover { background: #e9ecf1; }
#home[data-theme="light"] .cp-card { box-shadow: 0 16px 40px rgba(30, 40, 60, .1); }
#home[data-theme="light"] .cp-send, #home[data-theme="light"] .tp-use { color: #fff; }
#home[data-theme="light"] .hm-card-ic { color: hsl(var(--h), 65%, 40%); }
#home[data-theme="light"] .tp-cover { color: hsl(var(--h), 60%, 38%); }
#home[data-theme="light"] .tp-ic { background: rgba(255, 255, 255, .55); }
#home[data-theme="light"] .cc-cover { background-color: #eef0f4; background-image: radial-gradient(#d3d8e0 1px, transparent 1px); }
#home[data-theme="light"] .cc-blank { color: #b8bfca; }
#home[data-theme="light"] .canvas-card:hover { border-color: #c3c9d3; }
#home[data-theme="light"] .badge { color: #a16207; background: rgba(250, 204, 21, .15); }
#home[data-theme="light"] ::-webkit-scrollbar-thumb { background: #cfd4dc; }

/* ---------- 首页视觉升级：保留原应用结构，黑 + 香槟金 ---------- */
#home {
  --bg: #05070b;
  --bg2: #090d14;
  --panel: #0d121b;
  --panel2: #131a25;
  --line: #1d2634;
  --line2: #2b3a50;
  --text: #f4f7fb;
  --dim: #9aa7b9;
  --mute: #667286;
  --accent: #6ea8ff;
  --accent2: #9ac2ff;
  --glow: rgba(83, 145, 255, .16);
}
#home .sh-side { background: #060910; border-color: #1b2431; }
#home .sh-nav { overflow-y: auto; scrollbar-width: none; }
#home .sh-nav::-webkit-scrollbar { display: none; }
#home .sh-nav [data-nav].on { background: rgba(83,145,255,.13); border: 1px solid rgba(110,168,255,.22); }
#home .sh-view { background: #05070b; }
#home .logo { background: linear-gradient(145deg, #78b2ff, #2e5f9e); }
#home .sh-login { width: auto; justify-content: center; color: #fff; border-color: #3e74c4; background: #2f66b7; }
#home .sh-login:hover { background: #3978d1; border-color: #5995ef; }
#home .sh-login .logo-img, #home .sh-login .logo { width: 18px; height: 18px; }

.hm-hero {
  position: relative;
  max-width: none;
  min-height: 560px;
  padding: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #080808;
  isolation: isolate;
}
.hm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--hero-art) center 42% / cover no-repeat;
  opacity: .72;
}
.hm-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 42%, rgba(6,6,6,.08), rgba(6,6,6,.62) 60%, rgba(6,6,6,.96) 100%),
    linear-gradient(180deg, rgba(6,6,6,.38), rgba(6,6,6,.86));
}
.hm-hero-inner { position: relative; max-width: 1000px; margin: 0 auto; padding: 66px 32px 44px; text-align: center; }
.hm-eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 16px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .2em; }
.hm-eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hm-hero h1 { color: var(--text); font-size: clamp(38px, 5vw, 60px); letter-spacing: -.045em; }
.hm-hero h1 em { background: linear-gradient(90deg, var(--accent), #f1d9ab); -webkit-background-clip: text; background-clip: text; }
.hm-hero > .hm-hero-inner > p { color: #cbc5bb; }
.hm-hero .cp-tabs { background: rgba(16,16,17,.82); border-color: rgba(255,255,255,.12); backdrop-filter: blur(14px); }
.hm-hero .cp-tabs button.on { background: #f5f2eb; color: #171512; }
.hm-hero .cp-card { background: rgba(18,18,19,.88); border-color: rgba(255,255,255,.17); box-shadow: 0 22px 60px rgba(0,0,0,.38); backdrop-filter: blur(18px); }
.hm-hero .cp-send { color: #17130e; background: linear-gradient(135deg, #d9bc82, #f0ca8f); box-shadow: 0 8px 22px rgba(217,188,130,.24); }
.hm-link { color: #aaa59d; }
.hm-link:hover { color: var(--accent); }

.hm-head { align-items: flex-end; }
.hm-head > div { display: grid; gap: 4px; }
.hm-head h2 { font-size: 21px; letter-spacing: -.02em; }
.hm-kicker { color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: .17em; }
.hm-count { color: var(--mute); font-size: 11px; }
.hm-feat { grid-template-columns: minmax(320px, 1.15fr) 2.85fr; gap: 18px; }
.hm-big { position: relative; min-height: 416px; }
.hm-big-art { flex: 1; min-height: 286px; }
.hm-big-text { padding: 22px 24px 24px; }
.hm-big-text h3 { font-size: 22px; }
.hm-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 16px; }
.hm-card { position: relative; overflow: hidden; background: var(--panel); isolation: isolate; }
.hm-card-bg { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; transform: scale(1.03); transition: transform .4s, opacity .3s; }
.hm-card::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.18), rgba(10,10,10,.95)); }
.hm-card:hover .hm-card-bg { opacity: .72; transform: scale(1.08); }
.hm-card-ic { background: rgba(217,188,130,.14); color: var(--accent); backdrop-filter: blur(8px); }
.hm-card:hover { border-color: rgba(217,188,130,.42); }
.hm-card { padding: 20px; gap: 8px; }
.hm-card-t { font-size: 16px; }
.hm-card-d { font-size: 12.5px; }
.hm-card-tag { color: #c5b89f; }

.hm-filters { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; }
.hm-filters::-webkit-scrollbar { display: none; }
.hm-filters button { flex: none; height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--dim); font-size: 12px; }
.hm-filters button:hover { color: var(--text); }
.hm-filters button.on { border-color: var(--accent); background: var(--accent); color: #17130e; font-weight: 700; }
.hm-cases { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.hm-case { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.hm-case-media { position: relative; display: block; width: 100%; aspect-ratio: 16/9; padding: 0; border: 0; overflow: hidden; background: #0d0d0e; }
.hm-case-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, filter .3s; }
.hm-case:hover .hm-case-media img { transform: scale(1.045); filter: saturate(1.05); }
.hm-case-cat { position: absolute; top: 10px; left: 10px; padding: 3px 8px; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; background: rgba(8,8,8,.62); color: #fff; font-size: 10px; backdrop-filter: blur(8px); }
.hm-case-play { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(8,8,8,.7); color: #fff; backdrop-filter: blur(8px); }
.hm-case-info { padding: 12px 13px 7px; }
.hm-case-info h3 { margin: 0; font-size: 14px; font-weight: 600; }
.hm-case-info p { height: 34px; margin: 5px 0 0; overflow: hidden; color: var(--mute); font-size: 11px; line-height: 1.5; }
.hm-case-use { margin: 0 10px 10px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--dim); text-align: left; }
.hm-case-use:hover { border-color: rgba(217,188,130,.4); color: var(--accent); }
.hm-more { grid-column: 1 / -1; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--dim); }
.hm-more:hover { border-color: var(--accent); color: var(--accent); }

.hm-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.hm-steps > div { min-height: 118px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(150deg, rgba(217,188,130,.055), transparent 60%), var(--panel); }
.hm-steps b { display: block; color: var(--accent); font: 700 10px/1.2 Consolas, monospace; letter-spacing: .12em; }
.hm-steps strong { display: block; margin: 13px 0 6px; font-size: 14px; }
.hm-steps span { color: var(--dim); font-size: 12px; line-height: 1.55; }
.hm-login-tip { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--dim); }

.modal.lb { width: min(900px, 72vw) !important; max-height: 70vh; }
.lb .modal-body { padding: 10px 12px 14px; }
.lightbox { display: grid; place-items: center; }
.lightbox video, .lightbox img { display: block; width: min(760px, 68vw); max-height: 62vh; object-fit: contain; border-radius: 12px; background: #050505; }

@media (max-width: 1180px) {
  .hm-feat { grid-template-columns: 1fr; }
  .hm-cases { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .hm-hero { min-height: 520px; }
  .hm-hero-inner { padding: 42px 18px 32px; }
  .hm-grid { grid-template-columns: repeat(2,1fr); }
  .hm-cases { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hm-steps { grid-template-columns: repeat(2,1fr); }
}

/* 唯一首页：顶栏、居中案例区、黑蓝 / 纯白双主题 */
#home { background: #05070b; }
.sh-top {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 58px; padding: 0 24px; background: rgba(6, 10, 17, .96);
  border-bottom: 1px solid var(--line);
}
.sh-top > b { font-size: 15px; letter-spacing: .02em; }
.sh-top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.sh-top .sh-login { height: 34px; padding: 0 16px; border-radius: 9px; }
.sh-top .sh-login .logo-img, .sh-top .sh-login .logo { width: 16px; height: 16px; }
.user-chip.top { width: auto; max-width: 260px; padding: 0 12px; }
.sh-label {
  margin: 10px 11px 3px; color: var(--mute); font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
}
.sh-label + [data-nav] { margin-top: 1px; }
.hm-head.center { flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hm-head.center > div { justify-items: center; }
.hm-head.center > .hm-count { margin-top: 2px; }
.hm-sec { max-width: 1420px; padding-left: 44px; padding-right: 44px; }
.hm-hero-inner { max-width: 1160px; }
.hm-filterbar { display: flex; flex-direction: column; align-items: center; gap: 7px; margin: 8px 0 24px; }
.hm-filters { justify-content: center; flex-wrap: wrap; gap: 9px; padding: 2px 0 10px; max-width: 100%; }
.hm-filters button { height: 36px; padding: 0 16px; font-size: 13px; }
.hm-filters button.on { color: #fff; }
.hm-case-search { display: flex; width: min(320px, 100%); }
.hm-case-search input {
  width: 100%; height: 34px; padding: 0 13px; border: 1px solid var(--line2); border-radius: 999px;
  outline: none; background: var(--panel); color: var(--text); font-size: 12px;
}
.hm-case-search input:focus { border-color: var(--accent); }
.hm-cases { width: 100%; gap: 14px; }
.hm-case { border-radius: 14px; cursor: pointer; }
.hm-case-media { aspect-ratio: 16 / 9; background: var(--bg2); }
.hm-case-time {
  position: absolute; right: 10px; bottom: 10px; padding: 2px 7px; border-radius: 999px;
  color: #fff; font-size: 10px; background: rgba(4, 8, 14, .76); backdrop-filter: blur(8px);
}
.hm-case-play { right: 10px; top: 10px; bottom: auto; }
.hm-case-info { min-height: 92px; padding: 13px 14px 8px; }
.hm-case-info h3 { font-size: 15px; }
.hm-case-info p {
  display: -webkit-box; height: auto; min-height: 33px; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; overflow: hidden;
}
.hm-case-use { height: 32px; background: var(--bg2); }
.modal.hm-case-modal { width: min(1180px, calc(100vw - 48px)); height: auto; max-height: calc(100dvh - 32px); }
.hm-case-modal .modal-head { flex: none; }
.hm-case-modal .modal-body { min-height: 0; padding: 16px 18px 18px; overflow: auto; }
.hm-case-detail { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .72fr); gap: 20px; min-height: 0; align-items: stretch; }
.hm-case-detail-media {
  display: grid; place-items: center; min-width: 0; min-height: 0; aspect-ratio: var(--case-media-ratio, 16 / 9);
  padding: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #05070b;
}
.hm-case-detail-media video, .hm-case-detail-media img {
  display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 10px;
}
.hm-case-detail-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 360px; height: auto; padding: 4px 2px; overflow: visible; }
.hm-case-detail-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-case-detail-meta span { padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--dim); font-size: 11px; }
.hm-case-detail-copy > p { margin: 0; color: var(--text); font-size: 14px; line-height: 1.75; }
.hm-case-prompt { min-height: 0; max-height: 210px; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.hm-case-prompt b { display: block; margin-bottom: 7px; color: var(--accent); font-size: 12px; }
.hm-case-prompt p { margin: 0; color: var(--dim); font-size: 12.5px; line-height: 1.7; }
.hm-case-try {
  justify-content: center; width: 100%; min-height: 42px; margin-top: auto; font-weight: 700;
  border-color: var(--accent); background: var(--accent); color: #fff;
}
.hm-case-try:hover { filter: brightness(1.08); }
.hm-case-modal.is-portrait .hm-case-detail {
  grid-template-columns: var(--case-media-width) minmax(300px, 1fr);
  justify-content: center;
}
.hm-case-modal.is-portrait .hm-case-detail-media {
  width: var(--case-media-width);
  height: min(72dvh, 720px);
  aspect-ratio: auto;
}
.hm-case-modal.is-portrait .hm-case-detail-copy { height: min(72dvh, 720px); }
.hm-case-modal.is-landscape .hm-case-detail-media { height: auto; }

/* 电商模板：公开模板结构 + 产品图 / 台词 / 优惠信息的一键替换流程 */
.ec-page { max-width: 1420px; margin: 0 auto; padding: 34px 44px 80px; }
.ec-head, .ec-detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.ec-head h1, .ec-detail-top h1 { margin: 5px 0 8px; font-size: clamp(28px, 3vw, 42px); letter-spacing: -.03em; }
.ec-head p, .ec-detail-top p { max-width: 720px; margin: 0; color: var(--dim); line-height: 1.75; }
.ec-kicker { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.ec-source { flex: none; margin-top: 8px; color: var(--mute); font-size: 11px; }
.ec-filters { display: flex; flex-wrap: wrap; gap: 9px; margin: 12px 0 24px; }
.ec-filters button { height: 36px; padding: 0 16px; border: 1px solid var(--line2); border-radius: 999px; background: var(--panel); color: var(--dim); }
.ec-filters button.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.ec-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.ec-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); color: var(--text); text-decoration: none; }
.ec-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.ec-card-media { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; background: var(--bg2); }
.ec-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.ec-card:hover img { transform: scale(1.035); }
.ec-card-cat { position: absolute; left: 9px; top: 9px; padding: 3px 8px; border-radius: 999px; background: rgba(5,8,13,.72); color: #fff; font-size: 10px; }
.ec-card-play { position: absolute; right: 9px; top: 9px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(5,8,13,.72); color: #fff; }
.ec-card-copy { display: flex; flex-direction: column; gap: 6px; padding: 12px 13px 14px; }
.ec-card-copy b { font-size: 14px; }
.ec-card-copy em { color: var(--dim); font-size: 12px; line-height: 1.55; font-style: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ec-back { display: inline-flex; align-items: center; gap: 5px; flex: none; margin-top: 7px; color: var(--dim); text-decoration: none; }
.ec-back:hover { color: var(--accent); }
.ec-detail-top > div { flex: 1; }
.ec-detail-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); gap: 22px; align-items: start; }
.ec-preview, .ec-form { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.ec-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 600px; padding: 18px; background: #05070b; }
.ec-preview video, .ec-preview img { display: block; width: auto; max-width: 100%; height: min(66vh, 660px); border-radius: 12px; background: #000; object-fit: contain; }
.ec-preview-tip { color: #8f9bad; font-size: 11px; }
.ec-form { display: flex; flex-direction: column; gap: 15px; padding: 22px; }
.ec-field { display: grid; gap: 8px; }
.ec-field label { color: var(--text); font-size: 13px; font-weight: 700; }
.ec-field .input { width: 100%; }
.ec-field textarea.input { min-height: 82px; resize: vertical; line-height: 1.6; }
.ec-upload { display: grid; place-items: center; gap: 7px; min-height: 150px; padding: 14px; border: 1px dashed var(--line2); border-radius: 12px; background: var(--bg2); color: var(--dim); text-align: center; cursor: pointer; overflow: hidden; }
.ec-upload.has-file { grid-template-columns: 72px 1fr; text-align: left; }
.ec-upload img { width: 72px; height: 90px; border-radius: 9px; object-fit: cover; }
.ec-upload b { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 13px; }
.ec-upload span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.ec-upload small { color: var(--mute); font-size: 11px; }
.ec-upload-actions { display: flex; gap: 8px; }
.ec-generate { justify-content: center; min-height: 44px; margin-top: 4px; background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.ec-hint { margin: -4px 0 0; color: var(--mute); font-size: 11px; line-height: 1.55; text-align: center; }
.hm-card { color: var(--text); }
.hm-card-tag { color: var(--dim); }
.hm-hero { background: #05070b; }
.hm-hero h1 em { background: linear-gradient(90deg, #6ea8ff, #b8d5ff); -webkit-background-clip: text; background-clip: text; }
.hm-hero .cp-send { color: #fff; background: linear-gradient(135deg, #4f8fe8, #76b0ff); box-shadow: 0 8px 22px rgba(76, 142, 235, .28); }
.hm-card-ic { background: rgba(92, 154, 255, .14); }
.hm-card:hover { border-color: rgba(110, 168, 255, .52); }
.hm-case-use:hover { border-color: rgba(110, 168, 255, .5); }
#home[data-theme="light"] {
  --bg: #ffffff;
  --bg2: #f6f8fb;
  --panel: #ffffff;
  --panel2: #f2f5f9;
  --line: #dde3eb;
  --line2: #cbd4df;
  --text: #0b111a;
  --dim: #465366;
  --mute: #758195;
  --accent: #276bd2;
  --accent2: #4f8fe8;
  --glow: rgba(39, 107, 210, .1);
  background: #fff;
}
#home[data-theme="light"] .sh-side { background: #f7f9fc; border-color: #e1e6ed; }
#home[data-theme="light"] .sh-top { background: #fff; border-color: #e1e6ed; }
#home[data-theme="light"] .sh-login { color: #1557c0; border-color: #9dbfee; background: #eaf3ff; }
#home[data-theme="light"] .sh-login:hover { color: #fff; border-color: #276bd2; background: #276bd2; }
#home[data-theme="light"] .sh-view, #home[data-theme="light"] .hm-hero { background: #fff; }
#home[data-theme="light"] .hm-hero::before { opacity: .16; filter: grayscale(.2); }
#home[data-theme="light"] .hm-hero::after {
  background: linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,255,255,.95) 62%, #fff);
}
#home[data-theme="light"] .hm-hero h1, #home[data-theme="light"] .hm-hero > .hm-hero-inner > p,
#home[data-theme="light"] .hm-link { color: #0b111a; }
#home[data-theme="light"] .hm-hero .cp-tabs { background: #fff; border-color: #d9e0e9; }
#home[data-theme="light"] .hm-hero .cp-tabs button.on { background: #0b111a; color: #fff; }
#home[data-theme="light"] .hm-hero .cp-card { background: rgba(255,255,255,.95); border-color: #d6dee8; box-shadow: 0 18px 48px rgba(34,55,84,.12); }
#home[data-theme="light"] .hm-card::before { background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.9)); }
#home[data-theme="light"] .hm-card-bg { opacity: .7; }
#home[data-theme="light"] .hm-card { border-color: #dde3eb; }
#home[data-theme="light"] .hm-case { border-color: #dde3eb; box-shadow: 0 8px 24px rgba(24,41,66,.06); }
#home[data-theme="light"] .hm-case-info p { color: #5d697b; }
#home[data-theme="light"] .hm-case-use { background: #f7f9fc; }
#home[data-theme="light"] .hm-filters button { background: #fff; color: var(--dim); }
#home[data-theme="light"] .hm-filters button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
#home[data-theme="light"] .hm-case-cat, #home[data-theme="light"] .hm-case-time,
#home[data-theme="light"] .hm-case-play { color: #fff; }
#home[data-theme="light"] .cp-top textarea { color: var(--text); }
#home[data-theme="light"] .lightbox video, #home[data-theme="light"] .lightbox img { background: #f3f5f8; }

@media (max-width: 1220px) {
  .ec-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .ec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ec-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sh-top { min-height: 52px; padding: 0 14px; }
  .hm-sec { padding-left: 20px; padding-right: 20px; }
  .hm-case-detail { grid-template-columns: 1fr; gap: 16px; }
  .modal.hm-case-modal { width: calc(100vw - 24px) !important; height: auto; max-height: calc(100dvh - 24px); }
  .hm-case-modal .modal-body { padding: 12px; overflow: auto; }
  .hm-case-detail { height: auto; }
  .hm-case-detail-media {
    width: 100% !important; height: auto !important; min-height: 0; max-height: 64dvh;
    aspect-ratio: var(--case-media-ratio, 16 / 9) !important;
  }
  .hm-case-detail-copy { height: auto !important; min-height: 0; }
  .ec-page { padding: 24px 20px 70px; }
  .ec-head, .ec-detail-top { display: grid; gap: 10px; }
  .ec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ec-detail-grid { grid-template-columns: 1fr; }
  .ec-preview { min-height: 0; }
  .ec-preview video { height: 58vh; }
  .hm-head.center { align-items: center; }
  .hm-filterbar { align-items: stretch; }
  .hm-filters { justify-content: flex-start; padding-left: 2px; }
  .hm-case-search { align-self: center; }
  .hm-case-info { min-height: 84px; }
}

/* Logo 大图浮层：只展示图片，不带弹窗外框 */
.logo-zoom { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 4vh 4vw;
  background: #000; cursor: zoom-out; animation: lzFade .16s ease both; }
.logo-zoom img { display: block; max-width: 92vw; max-height: 92vh; width: auto; height: auto;
  cursor: zoom-out; }
@keyframes lzFade { from { opacity: 0 } to { opacity: 1 } }
