/* ==========================================================================
   aigc-wonder · 设计系统
   深色底 / 纯紫主色 / 小圆角 / 左侧导航
     背景 #000                主色 #590BF6
     卡片 #19191a             导航选中 #202124
     文字 #f4f4f0 / #8c8e89 / #5c5c69
     圆角 4px / 6px           侧栏 168px   内容列 1018px
     标题 24px/500/-1.08px    正文 12px
   ========================================================================== */

:root {
  /* 底色：纯黑，无渐变 */
  --bg:        #000000;
  --bg-2:      #0d0d0d;
  --panel:     #19191a;
  --panel-3:   #141418;
  --hover:     #202124;
  --raise:     #252729;

  /* 主色：纯紫，不用渐变 */
  --accent:    #590bf6;
  --accent-hi: #6f00ff;
  --accent-lo: #cbbcff;
  --accent-dim: rgba(89, 11, 246, .14);

  /* 文字 */
  --tx:        #f4f4f0;
  --tx-2:      #c8cac4;
  --muted:     #8c8e89;
  --muted-2:   #5c5c69;

  /* 线条：极淡 */
  --line:      rgba(255, 255, 255, .06);
  --line-2:    rgba(255, 255, 255, .10);

  /* 状态 */
  --ok:        #4ade80;
  --warn:      #fbbf24;
  --err:       #f87171;
  --info:      #60a5fa;

  /* 尺寸：小圆角 */
  --sb-w:      206px;
  --col-w:     1180px;
  --r-xs:      3px;
  --r-sm:      4px;
  --r:         6px;
  --r-lg:      8px;
  --r-xl:      10px;

  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .8);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          "PingFang SC", "Noto Sans", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.6;
  color: var(--tx);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img, video { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2c; border-radius: 7px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3d; }

#root { position: relative; min-height: 100vh; }
.shell { display: flex; min-height: 100vh; }

/* ==========================================================================
   侧栏
   ========================================================================== */
.sidebar {
  width: var(--sb-w);
  flex: 0 0 var(--sb-w);
  background: var(--bg);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 14px 12px 12px;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 8px; padding: 2px 6px 16px; }
.brand-logo {
  width: 26px; height: 26px; border-radius: var(--r);
  display: grid; place-items: center;
  background: var(--accent);
  font-weight: 700; font-size: 13px; color: #fff;
  flex: 0 0 auto;
}
.brand-txt b { font-size: 13px; font-weight: 600; display: block; letter-spacing: .2px; }
.brand-txt span { font-size: 10.5px; color: var(--muted-2); }

.projsel {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 2px 12px; padding: 8px 11px;
  border-radius: var(--r); border: 1px solid var(--line);
  background: var(--panel); font-size: 12.5px; color: var(--tx-2);
  cursor: pointer; transition: background .12s;
}
.projsel:hover { background: var(--hover); }

.nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.nav-group { color: var(--muted-2); font-size: 10.5px; padding: 13px 8px 5px; letter-spacing: .3px; }

.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  border-radius: var(--r);
  color: var(--tx-2);
  font-size: 12px;
  margin-bottom: 1px;
  width: 100%; text-align: left;
  transition: background .12s, color .12s;
  line-height: 1.4;
}
.nav-item:hover { background: rgba(255, 255, 255, .045); color: var(--tx); }
.nav-item.on { background: var(--hover); color: var(--tx); font-weight: 600; }
.nav-item .ni { width: 14px; flex: 0 0 14px; opacity: .85; display: grid; place-items: center; }
.nav-item.on .ni { opacity: 1; }
.nav-item .tag {
  margin-left: auto; font-size: 9.5px; font-weight: 600;
  padding: 1px 5px; border-radius: var(--r-xs);
  background: var(--accent); color: #fff;
}
.nav-ext { margin-left: auto; font-size: 11px; color: var(--muted-2); }
.nav-item:hover .nav-ext { color: var(--tx); }

.nav-foot { border-top: 1px solid var(--line); padding-top: 9px; margin-top: 5px; }

.balcard {
  margin: 6px 2px 8px; padding: 9px 10px;
  border-radius: var(--r); background: var(--panel); border: 1px solid var(--line);
}
.balcard .lbl { font-size: 10.5px; color: var(--muted-2); }
.balcard .num { font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.balcard .num small { font-size: 10px; font-weight: 400; color: var(--muted); margin-left: 2px; }

/* ==========================================================================
   主区
   ========================================================================== */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px; border-bottom: 1px solid var(--line);
  background: var(--bg); position: sticky; top: 0; z-index: 15;
}
.topbar h1 { font-size: 13px; font-weight: 600; }
.topbar .spacer { flex: 1; }

.content { flex: 1; padding: 34px 40px 60px; width: 100%; margin: 0 auto; }
.content.narrow { max-width: var(--col-w); }

/* ==========================================================================
   通用组件
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 10px;
  border-radius: var(--r-sm);
  background: var(--hover); color: var(--tx-2);
  font-size: 12px;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.btn:hover { background: var(--raise); color: var(--tx); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn.pri { background: var(--accent); color: #fff; font-weight: 500; }
.btn.pri:hover { background: var(--accent-hi); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--tx); }
.btn.sm { height: 26px; padding: 0 8px; font-size: 11.5px; }
.btn.lg { height: 34px; padding: 0 16px; font-size: 12.5px; }
.btn.block { width: 100%; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px;
}
.card.pad-lg { padding: 20px; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.field .hint { font-size: 10.5px; color: var(--muted-2); margin-top: 4px; line-height: 1.5; }

input[type=text], input[type=password], input[type=number], input[type=search],
textarea, select {
  width: 100%; padding: 7px 10px;
  background: var(--panel-3); border: 1px solid var(--line);
  border-radius: var(--r-sm); outline: none;
  transition: border-color .12s; font-size: 12px;
  color: var(--tx);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 74px; line-height: 1.6; }
select { cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 26px; padding: 0 10px;
  border-radius: var(--r-sm);
  background: transparent; border: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 5px;
  transition: all .12s;
}
.chip:hover { background: var(--hover); color: var(--tx); border-color: var(--line-2); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }

.badge {
  display: inline-block; font-size: 10px; font-weight: 500;
  padding: 1px 5px; border-radius: var(--r-xs); line-height: 1.5;
}
.badge.pri { background: var(--accent); color: #fff; }
.badge.ok  { background: rgba(74, 222, 128, .14); color: var(--ok); }
.badge.warn{ background: rgba(251, 191, 36, .14); color: var(--warn); }
.badge.err { background: rgba(248, 113, 113, .14); color: var(--err); }
.badge.info{ background: rgba(96, 165, 250, .14); color: var(--info); }
.badge.mute{ background: rgba(255,255,255,.07); color: var(--muted); }

.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

.empty { text-align: center; padding: 54px 20px; color: var(--muted-2); font-size: 12px; }
.empty .big { font-size: 28px; margin-bottom: 8px; opacity: .4; }

.spin {
  width: 12px; height: 12px; border: 2px solid rgba(255,255,255,.2);
  border-top-color: currentColor; border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   首页
   ========================================================================== */
.hero { padding: 74px 0 10px; }
.hero-inner { max-width: var(--col-w); margin: 0 auto; }

.hero h2 {
  font-size: 30px; font-weight: 500; letter-spacing: -1.25px;
  line-height: 1.4; color: var(--tx); margin-bottom: 20px;
}
.hero h2 em { font-style: normal; color: var(--accent-lo); }
.caret {
  display: inline-block; width: 1.5px; height: .82em;
  background: var(--accent-lo); vertical-align: -.06em; margin-left: 3px;
  animation: blink 1.05s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* 模式切换：胶囊，纯色 */
.mode-tabs { display: inline-flex; gap: 2px; margin-bottom: 20px; }
.mode-tabs button {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px;
  border-radius: var(--r-sm);
  font-size: 12px; color: var(--muted);
  transition: all .12s;
}
.mode-tabs button:hover { color: var(--tx); background: var(--hover); }
.mode-tabs button.on { background: var(--accent); color: #fff; font-weight: 500; }

/* 提示词框 */
.promptbox {
  border-radius: var(--r-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px 22px 14px;
  transition: border-color .14s;
}
.promptbox:focus-within { border-color: rgba(89, 11, 246, .5); }
.promptbox textarea {
  border: 0; background: transparent; padding: 2px 0;
  min-height: 132px; font-size: 14px; color: var(--tx); line-height: 1.7;
}
.promptbox textarea:focus { border: 0; }
.promptrow { display: flex; align-items: center; gap: 8px; margin-top: 16px; }

/* 已附加的技能 token */
.attached {
  display: flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 6px 0 8px; margin-bottom: 9px;
  border-radius: var(--r-sm);
  background: var(--accent-dim);
  border: 1px solid rgba(89, 11, 246, .45);
  font-size: 11.5px; width: fit-content; max-width: 100%;
}
.attached .at-ic { display: grid; place-items: center; color: var(--accent-lo); }
.attached .at-nm { font-weight: 600; color: var(--tx); }
.attached .at-ep { color: var(--muted); font-size: 10.5px; }
.attached .at-x { color: var(--muted); padding: 2px; display: grid; place-items: center; }
.attached .at-x:hover { color: var(--err); }

/* 技能自带的其它字段（文件 / 下拉） */
.ce-wrap {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
}
.ce-f label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.ce-drop {
  border: 1px dashed var(--line-2); border-radius: var(--r-sm);
  padding: 9px 10px; font-size: 11.5px; color: var(--muted-2);
  cursor: pointer; text-align: center; transition: all .12s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ce-drop:hover, .ce-drop.over { border-color: var(--accent); color: var(--tx); background: var(--accent-dim); }
.ce-drop.has { border-style: solid; border-color: rgba(89, 11, 246, .5); color: var(--accent-lo); }

/* 首页内联结果 */
.hp-result {
  margin-top: 12px; padding: 12px;
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel);
}
.hp-result.err { border-color: rgba(248, 113, 113, .35); }
.hp-result .media {
  border-radius: var(--r); overflow: hidden; background: var(--panel-3);
  border: 1px solid var(--line); margin-bottom: 10px;
}
.hp-result .media img, .hp-result .media video { width: 100%; }
.hp-result .media audio { width: 100%; padding: 8px; }

.toolpill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 8px;
  border-radius: var(--r-sm);
  background: transparent; color: var(--tx-2);
  font-size: 12px; transition: all .12s;
}
.toolpill:hover { background: var(--hover); color: var(--tx); }
.toolpill.on { background: var(--accent); color: #fff; }

.sendbtn {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  transition: background .12s; flex: 0 0 auto;
}
.sendbtn:hover { background: var(--accent-hi); }

.skillrow { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }

/* 特色大卡 */
.featgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.feat {
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--panel);
  text-align: left; transition: border-color .14s, transform .14s;
}
.feat:hover { border-color: rgba(89, 11, 246, .5); transform: translateY(-2px); }
.feat .thumb {
  aspect-ratio: 16 / 9; display: grid; place-items: center; font-size: 26px;
  background: linear-gradient(140deg, #1a1230, #241a4d 50%, #12203a);
  position: relative; overflow: hidden;
}
.feat .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.feat:hover .thumb img { transform: scale(1.045); }
.feat .thumb::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.55)),
              radial-gradient(circle at 32% 24%, rgba(89,11,246,.22), transparent 62%);
}
.feat .thumb span { position: relative; z-index: 1; }
.feat .bd { padding: 11px 12px 13px; }
.feat .bd b { font-size: 13px; font-weight: 600; display: block; margin-bottom: 2px; }
.feat .bd p { font-size: 11.5px; color: var(--muted); line-height: 1.55; }

.sec { margin-top: 54px; }
.sec-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-hd h3 { font-size: 14px; font-weight: 600; letter-spacing: -.2px; }

/* ==========================================================================
   应用卡片
   ========================================================================== */
.appgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); gap: 10px; }
.appcard {
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--panel); padding: 13px;
  text-align: left; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .14s, transform .14s; position: relative; overflow: hidden;
}
.appcard:hover { border-color: rgba(89, 11, 246, .5); transform: translateY(-2px); }
.appcard .ico {
  width: 32px; height: 32px; border-radius: var(--r);
  display: grid; place-items: center;
  background: var(--hover); color: var(--accent-lo);
  flex: 0 0 auto; overflow: hidden;
}
.appcard .ico img { width: 100%; height: 100%; object-fit: cover; }
.appcard b { font-size: 12.5px; font-weight: 600; }
.appcard p {
  font-size: 11.5px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.appcard .meta { display: flex; align-items: center; gap: 5px; margin-top: auto; flex-wrap: wrap; }

/* ==========================================================================
   技能下拉
   ========================================================================== */
.skillpop {
  position: fixed; z-index: 60;
  width: 408px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.skillpop[hidden] { display: none !important; }
.skillpop .sp-hd { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; }
.skillpop .sp-hd .t { font-size: 12.5px; font-weight: 600; }
.skillpop .sp-tabs { display: flex; gap: 2px; padding: 0 12px 8px; }
.skillpop .sp-tabs button {
  height: 24px; padding: 0 9px; border-radius: var(--r-sm);
  font-size: 11.5px; color: var(--muted); transition: all .12s;
}
.skillpop .sp-tabs button:hover { background: var(--hover); color: var(--tx); }
.skillpop .sp-tabs button.on { background: var(--hover); color: var(--tx); font-weight: 600; }
.skillpop .sp-body { max-height: 372px; overflow-y: auto; padding: 0 6px 6px; }
.skillpop .sp-item {
  display: flex; gap: 10px; align-items: flex-start;
  width: 100%; text-align: left; padding: 9px 8px;
  border-radius: var(--r); transition: background .12s;
}
.skillpop .sp-item:hover { background: var(--hover); }
.skillpop .sp-item .si {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: var(--r-sm);
  display: grid; place-items: center; font-size: 14px;
  background: var(--panel-3); color: var(--accent-lo);
}
.skillpop .sp-item .sc { flex: 1; min-width: 0; }
.skillpop .sp-item .s1 { display: flex; align-items: center; gap: 5px; margin-bottom: 2px; flex-wrap: wrap; }
.skillpop .sp-item .s1 .nm { font-size: 12px; font-weight: 600; color: var(--tx); }
.skillpop .sp-item .s1 .mini {
  font-size: 9.5px; padding: 0 4px; border-radius: 2px; line-height: 1.5;
  border: 1px solid var(--line-2); color: var(--muted);
}
.skillpop .sp-item .s1 .mini.hot { border-color: rgba(251,191,36,.5); color: var(--warn); }
.skillpop .sp-item .sd {
  font-size: 11px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.skillpop .sp-foot {
  border-top: 1px solid var(--line); padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
}
.skillpop .sp-foot .kbd { margin-left: auto; font-size: 10px; color: var(--muted-2); }

/* ==========================================================================
   工作台
   ========================================================================== */
.wt { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 1080px) { .wt { grid-template-columns: 1fr; } }

.wt-head { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.wt-head .ico {
  width: 38px; height: 38px; border-radius: var(--r); display: grid; place-items: center;
  font-size: 19px; background: var(--hover); flex: 0 0 auto; overflow: hidden;
}
.wt-head h2 { font-size: 16px; font-weight: 600; margin-bottom: 2px; letter-spacing: -.3px; }
.wt-head p { font-size: 11.5px; color: var(--muted); }

.ep-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; }

.drop {
  border: 1px dashed var(--line-2); border-radius: var(--r);
  padding: 20px 14px; text-align: center; color: var(--muted);
  font-size: 11.5px; cursor: pointer; transition: all .13s; background: var(--panel-3);
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-dim); color: var(--tx); }
.drop .fn { color: var(--accent-lo); font-weight: 600; margin-top: 4px; word-break: break-all; }

.result { min-height: 160px; }
.result .media { border-radius: var(--r); overflow: hidden; background: var(--panel-3); border: 1px solid var(--line); margin-bottom: 10px; }
.result .media img, .result .media video { width: 100%; }
.result .media audio { width: 100%; padding: 8px; }

pre.json {
  background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r);
  padding: 10px; font-size: 11px; line-height: 1.55; color: #9ae6b4;
  overflow: auto; max-height: 320px; white-space: pre-wrap; word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tasklist { display: flex; flex-direction: column; gap: 6px; }
.taskitem {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); font-size: 12px;
}
.taskitem .t { flex: 1; min-width: 0; }
.taskitem .t b { font-weight: 600; display: block; font-size: 12px; }
.taskitem .t span { color: var(--muted-2); font-size: 10.5px; word-break: break-all; }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { padding: 13px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); }
.stat .k { font-size: 11px; color: var(--muted); }
.stat .v { font-size: 19px; font-weight: 600; letter-spacing: -.4px; margin-top: 2px; }

.plangrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.plan {
  padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--panel); text-align: center; transition: border-color .14s;
}
.plan:hover { border-color: rgba(89, 11, 246, .5); }
.plan .pt { font-size: 11.5px; color: var(--muted); }
.plan .pv { font-size: 23px; font-weight: 700; letter-spacing: -.8px; margin: 5px 0 2px; }
.plan .pv small { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.plan .pp { font-size: 11px; color: var(--accent-lo); margin-bottom: 10px; }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 96px; padding-top: 8px; }
.bars .b { flex: 1; background: var(--accent); border-radius: 2px; min-height: 2px; position: relative; opacity: .85; }
.bars .b:hover { opacity: 1; }
.bars .b:hover::after {
  content: attr(data-tip); position: absolute; bottom: 104%; left: 50%; transform: translateX(-50%);
  background: var(--raise); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 3px 7px; font-size: 10.5px; white-space: nowrap; z-index: 5; color: var(--tx);
}

table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
table.tbl th, table.tbl td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); }
table.tbl th { color: var(--muted); font-weight: 500; font-size: 11px; }
table.tbl tbody tr:hover { background: rgba(255,255,255,.02); }

/* 模态 */
.mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .78);
  display: grid; place-items: center; padding: 20px;
}
.mask[hidden] { display: none !important; }
.modal {
  width: 100%; max-width: 360px;
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--r-xl); padding: 22px 20px;
  box-shadow: var(--shadow-pop);
}
.modal h3 { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.modal .sub { font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }

/* Toast */
#toasts {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none;
}
.toast {
  padding: 8px 14px; border-radius: var(--r); background: var(--raise);
  border: 1px solid var(--line-2); font-size: 12px; box-shadow: var(--shadow-pop);
  animation: toastIn .2s ease; max-width: 76vw;
}
.toast.ok { border-color: rgba(74,222,128,.4); color: #86efac; }
.toast.err { border-color: rgba(248,113,113,.4); color: #fca5a5; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } }

/* 顶部活动条 */
.banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 7px 40px 7px 14px; font-size: 12px;
  background: linear-gradient(90deg, #cbbcff, #b9a3ff 55%, #d3c6ff);
  color: #2a0a5e; position: relative; z-index: 25;
}
.banner b { font-weight: 700; }
.banner .cta {
  background: #fff; color: #590bf6; font-weight: 700; font-size: 11.5px;
  padding: 3px 11px; border-radius: var(--r-sm);
}
.banner .x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); opacity: .7; font-size: 14px; padding: 3px; }
.banner .x:hover { opacity: 1; }

/* 响应式 */
@media (max-width: 900px) {
  .featgrid { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: var(--shadow-pop);
  }
  .sidebar.open { transform: none; }
  .sb-toggle { display: inline-flex !important; }
  .content { padding: 16px 14px; }
  .hero { padding: 30px 0 4px; }
  .hero h2 { font-size: 20px; letter-spacing: -.6px; }
  .skillpop { width: calc(100vw - 24px); }
}
.sb-toggle { display: none; }

/* ==========================================================================
   全部应用（对标 likeadmin /ai/tools：瀑布流大图卡）
   ========================================================================== */
.la-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.la-tabs { display: flex; gap: 6px; }
.la-search { position: relative; width: 280px; }
.la-search input { padding-left: 32px; height: 34px; border-radius: 999px; }
.la-search-ic {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); display: grid; place-items: center; pointer-events: none;
}
.la-count { font-size: 11.5px; margin-bottom: 14px; }

/* 瀑布流：columns 实现高度不等的错落排布 */
.la-grid { columns: 5 232px; column-gap: 14px; }
.la-grid > * { break-inside: avoid; margin-bottom: 14px; display: block; }
@media (max-width: 1400px) { .la-grid { columns: 4 232px; } }
@media (max-width: 1100px) { .la-grid { columns: 3 210px; } }
@media (max-width: 760px)  { .la-grid { columns: 2 160px; } }

.tcard {
  position: relative; width: 100%; padding: 0;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--panel);
  text-align: left; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.tcard:hover { transform: translateY(-3px); border-color: rgba(89,11,246,.55); box-shadow: 0 14px 40px rgba(0,0,0,.55); }
.tcard-art { display: grid; place-items: center; position: relative; overflow: hidden; height: var(--th, 240px); }
.tcard-ic { color: rgba(255,255,255,.92); position: relative; z-index: 1; filter: drop-shadow(0 4px 14px rgba(0,0,0,.45)); }
.tcard-shine {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 18%, rgba(255,255,255,.20), transparent 55%),
              linear-gradient(180deg, rgba(0,0,0,0) 42%, rgba(0,0,0,.72));
}
.tcard-bd { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 13px 13px; display: flex; flex-direction: column; gap: 1px; }
.tcard-bd b { font-size: 13.5px; font-weight: 650; color: #fff; letter-spacing: -.1px; }
.tcard-bd span { font-size: 11.5px; color: rgba(255,255,255,.62); }
/* ==========================================================================
   物效：悬浮吉祥物 / 打字机 / 特色卡动态预览
   ========================================================================== */
.composer-wrap { position: relative; }
.mascot {
  position: absolute; right: 16px; top: -78px;
  width: 100px; height: 100px; pointer-events: none;
  animation: floaty 6.5s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
.mascot .ms-glow {
  position: absolute; inset: -22px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,255,.42), transparent 66%);
  filter: blur(7px);
}
.mascot .ms-bell {
  position: absolute; left: 50%; top: 6px; transform: translateX(-50%);
  width: 58px; height: 50px;
  border-radius: 52% 52% 42% 42% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 34% 28%, #efe6ff, #8b6cff 40%, #5222e0 76%, #2a0f8a);
  box-shadow: 0 0 26px rgba(124,92,255,.78), inset 0 -7px 15px rgba(0,0,0,.34);
}
.mascot .ms-bell::after {
  content: ''; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%);
  width: 46px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle, rgba(196,181,253,.85), transparent 70%);
  filter: blur(2px);
}
.mascot .ms-tent { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); display: flex; gap: 5px; }
.mascot .ms-tent i {
  display: block; width: 3px; height: 26px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(196,181,253,.95), rgba(124,92,255,.22));
  transform-origin: top center;
  animation: sway 2.1s ease-in-out infinite;
}
.mascot .ms-tent i:nth-child(2) { height: 33px; animation-delay: .18s; }
.mascot .ms-tent i:nth-child(3) { height: 37px; animation-delay: .36s; }
.mascot .ms-tent i:nth-child(4) { height: 30px; animation-delay: .54s; }
.mascot .ms-tent i:nth-child(5) { height: 24px; animation-delay: .72s; }
@keyframes sway { 0%,100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }

/* 特色卡：悬停播放动态预览 */
.feat .thumb img { position: relative; z-index: 1; }
.feat .thumb video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .35s ease; z-index: 1;
}
.feat:hover .thumb video { opacity: 1; }
.feat .thumb::after { z-index: 2; }

@media (max-width: 900px) { .mascot { display: none; } }
/* ==========================================================================
   工具工作台（对标 likeadmin /ai/tools 制作页）
   ========================================================================== */
.lw-head { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.lw-hd-txt h2 { font-size: 20px; font-weight: 650; letter-spacing: -.4px; margin-bottom: 3px; }
.lw-hd-txt p { font-size: 12px; color: var(--muted); }

.lw-grid { display: grid; grid-template-columns: 1fr 330px; gap: 22px; align-items: start; }
@media (max-width: 1080px) { .lw-grid { grid-template-columns: 1fr; } }

.lw-form { min-width: 0; }

.field-block { margin-bottom: 20px; }
.field-label { font-size: 12.5px; color: var(--tx-2); font-weight: 600; margin-bottom: 9px; }
.field-label .req { color: var(--err); }
.field-hint { font-size: 11px; color: var(--muted-2); margin-top: 6px; line-height: 1.55; }

/* 上传卡：两个按钮（本地上传 / 粘贴链接） */
.upload-card {
  border: 1.5px dashed var(--line-2); border-radius: var(--r-lg);
  padding: 22px 16px 16px; text-align: center;
  background: var(--panel-3); transition: all .15s;
}
.upload-card:hover, .upload-card.over { border-color: var(--accent); background: var(--accent-dim); }
.upload-card.has { border-style: solid; border-color: rgba(89,11,246,.55); }
.upload-card__icon { color: var(--muted-2); display: grid; place-items: center; margin-bottom: 8px; }
.upload-card:hover .upload-card__icon { color: var(--accent-lo); }
.upload-card__placeholder { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; word-break: break-all; }
.upload-card.has .upload-card__placeholder { color: var(--accent-lo); font-weight: 600; }
.upload-card__library { display: inline-flex; gap: 8px; }
.uc-btn {
  height: 30px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--hover); color: var(--tx-2); font-size: 12px;
  border: 1px solid var(--line-2); transition: all .13s;
}
.uc-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.uc-file { font-size: 11px; color: var(--muted-2); margin-top: 10px; }

/* 档位胶囊 / 参数选项卡 */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row .chip { height: 32px; padding: 0 16px; font-size: 12.5px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.opt-card {
  text-align: left; padding: 13px 14px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--panel);
  transition: all .15s;
}
.opt-card b { font-size: 12.5px; font-weight: 600; color: var(--tx-2); }
.opt-card:hover { border-color: var(--line-2); background: var(--hover); }
.opt-card.is-active { border-color: var(--accent); background: var(--accent-dim); }
.opt-card.is-active b { color: #fff; }

/* 底部：成本 + 生成 */
.lw-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.lw-cost { font-size: 12px; color: var(--muted); margin-bottom: 12px; text-align: center; }
.lw-cost b { color: var(--accent-lo); font-size: 15px; font-weight: 700; margin-left: 4px; }

.lw-result { margin-top: 8px; }

/* 右侧：任务与作品 */
.lw-side { border-left: 1px solid var(--line); padding-left: 22px; }
@media (max-width: 1080px) { .lw-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; } }
.lw-side-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.lw-side-hd b { font-size: 14px; font-weight: 650; }
.lw-works { display: flex; flex-direction: column; gap: 10px; max-height: 640px; overflow-y: auto; }
.work-card {
  display: flex; gap: 10px; padding: 8px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--panel);
}
.work-card__thumb {
  width: 62px; height: 62px; flex: 0 0 62px; border-radius: var(--r-sm);
  overflow: hidden; background: var(--panel-3); display: grid; place-items: center;
  color: var(--muted-2);
}
.work-card__thumb img, .work-card__thumb video { width: 100%; height: 100%; object-fit: cover; }
.work-card__bd { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.wc-t { font-size: 11.5px; color: var(--tx-2); word-break: break-all; line-height: 1.4; }
.wc-m { display: flex; align-items: center; gap: 6px; font-size: 10.5px; }
/* 卡片封面：真实封面图叠在渐变底之上，加载失败自动回落到渐变+图标 */
.tcard-ic { z-index: 0 !important; }
.tcard-cover {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1;
  transition: transform .45s ease;
}
.tcard:hover .tcard-cover { transform: scale(1.05); }
.tcard-shine { z-index: 2; }