:root {
    --bg: #f5f6f8; --side-bg: #fbfbfd; --white: #fff;
    --ink: #1f2937; --ink2: #4b5563; --muted: #94a3b8; --line: #e8ecf3;
    --blue: #2563eb; --blue-soft: #eef4ff; --radius: 14px;
  }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body { height: 100%; margin: 0; background: #f5f6f8; }
  html { color-scheme: light; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei UI', sans-serif;
    background: var(--bg); color: var(--ink); font-size: 15.5px;
    display: flex; height: 100%; overflow: hidden; overscroll-behavior: none;
    background-color: #f5f6f8;
  }

  /* ---------- 侧边栏（与 Windows 端一致） ---------- */
  .sidebar {
    width: clamp(196px, 24vw, 300px); flex: 0 0 auto;
    background: var(--side-bg); border-right: 1px solid var(--line);
    display: flex; flex-direction: column; padding: 14px 10px;
    overflow-y: auto;
  }
  .brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; }
  .brand .logo { width: 40px; height: 40px; border-radius: 11px; background: var(--blue-soft); display: grid; place-items: center; font-size: 22px; }
  .brand b { display: block; font-size: 16px; }
  .brand span { font-size: 12px; color: var(--muted); }
  .nav-group { font-size: 11.5px; color: var(--muted); padding: 12px 8px 5px; letter-spacing: .04em; }
  .nav-item {
    display: flex; align-items: center; gap: 9px; width: 100%;
    border: 0; background: transparent; color: var(--ink2);
    font-size: clamp(14px, 1.15vw, 16px); font-family: inherit; text-align: left;
    padding: 10px 9px; border-radius: 10px;
  }
  .nav-item .ico { width: 20px; text-align: center; font-size: 16px; flex: none; }
  .nav-item.on { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
  .nav-item[disabled] { opacity: .45; }

  /* ---------- 内容区 ---------- */
  .content { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 16px 18px 0; }
  .top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
  .top h1 { margin: 0; font-size: clamp(18px, 1.6vw, 24px); }
  .top span { font-size: 12.5px; color: var(--muted); }
  .view { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; contain: paint; }
  [hidden] { display: none !important; }

  .chat { flex: 1; min-height: 0; overflow-y: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
  .msg { max-width: 84%; padding: 9px 13px; border-radius: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; font-size: 15px; }
  .msg.pet { align-self: flex-start; background: #f1f5fb; border-bottom-left-radius: 5px; }
  .msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 5px; }
  .msg.sys { align-self: center; color: var(--muted); font-size: 12.5px; }
  .msg.typing { color: var(--muted); }
  .msg.typing::after { content: '…'; }

  .tools { display: flex; gap: 8px; }
  .tools button { flex: 1; height: 40px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); color: var(--ink2); font-size: 14px; font-family: inherit; }
  form { display: flex; gap: 8px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  input[type='text'] { flex: 1; height: 46px; border: 1px solid var(--line); border-radius: 13px; padding: 0 14px; font-size: 15px; font-family: inherit; outline: none; background: var(--white); }
  input:focus { border-color: #b9cdf5; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
  form button { height: 46px; padding: 0 20px; border: 0; border-radius: 13px; background: var(--blue); color: #fff; font-size: 15px; font-weight: 600; font-family: inherit; }
  form button:disabled { opacity: .5; }

  /* ---------- 习惯页 ---------- */
  .habits { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 16px; }
  .card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
  .card h2 { margin: 0 0 6px; font-size: 16px; }
  .h-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-top: 1px solid #f1f4f9; }
  .h-row:first-of-type { border-top: 0; }
  .h-name { font-size: 14.5px; }
  .h-hint { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
  .switch { width: 46px; height: 26px; border-radius: 999px; border: 0; background: #d7dce6; padding: 2px; position: relative; }
  .switch .knob { display: block; width: calc(50% - 1px); height: 100%; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.25); transition: transform .15s; }
  .switch.on { background: var(--blue); }
  .switch.on .knob { transform: translateX(100%); }
  .seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f7f9fc; }
  .seg button { border: 0; background: transparent; color: var(--ink2); font-size: 13px; font-family: inherit; padding: 7px 11px; white-space: nowrap; }
  .seg button + button { border-left: 1px solid var(--line); }
  .seg button.on { background: #fff; color: var(--blue); font-weight: 600; box-shadow: inset 0 0 0 1px #c7d7f5; }
  input[type='range'] { width: 130px; accent-color: var(--blue); }
  .info-list { margin: 6px 0 0; padding-left: 18px; color: var(--ink2); font-size: 13.5px; line-height: 1.9; }

  /* ---------- 动作库 ---------- */
  .act-bar { display: flex; gap: 8px; }
  .act-bar input[type='text'] { flex: 1; height: 42px; border-radius: 12px; }
  .act-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
  .act-chips::-webkit-scrollbar { display: none; }
  .act-chip { flex: none; border: 1px solid var(--line); background: var(--white); color: var(--ink2); font: inherit; font-size: 13px; padding: 7px 13px; border-radius: 999px; }
  .act-chip.on { background: var(--blue-soft); color: var(--blue); border-color: #c7d7f5; font-weight: 600; }
  .act-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 16px; scrollbar-gutter: stable; }
  .act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 10px; }
  .act-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
  .act-card.busy { box-shadow: inset 0 0 0 2px var(--blue); }
  .act-card.off { opacity: .5; }
  .act-card .thumb { position: relative; aspect-ratio: 16 / 9; background: #0e1420; display: grid; place-items: center; cursor: pointer; flex: none; }
  .act-card .ph { font-size: 22px; color: #93a4be; }
  .act-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0e1420; }
  .act-card .nm { font-size: 12.5px; line-height: 1.35; padding: 8px 9px 0; min-height: 26px; word-break: break-word; }
  .act-card .go { margin: 8px 9px 9px; height: 32px; border: 0; border-radius: 9px; background: var(--blue); color: #fff; font: inherit; font-size: 13px; font-weight: 600; }
  .act-card .go:disabled { opacity: .6; }
  .act-empty { grid-column: 1 / -1; color: var(--muted); font-size: 13px; padding: 26px 0; text-align: center; }
  .act-toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: 82vw; background: #1f2937; color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13px; line-height: 1.4; text-align: center; opacity: 0; pointer-events: none; transition: opacity .18s; z-index: 30; }
  .act-toast.on { opacity: .95; }

  /* ---------- 能力页（大肥鱼在中间，四角是四个能力） ---------- */
  .cap-stage { flex: 1; min-height: 0; overflow-y: auto; display: flex; align-items: center; justify-content: center; padding: 4px 2px 18px; }
  .cap-inner {
    position: relative; width: min(880px, 100%);
    display: grid; gap: clamp(14px, 4vh, 44px) 10px; padding: 2px;
    grid-template-columns: 1fr minmax(160px, 240px) 1fr;
    grid-template-rows: auto auto auto;
    align-items: center;
  }
  .cap-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  .cap-links line { stroke: #dde3ec; stroke-width: .4; }
  .cap-card {
    position: relative; z-index: 1; width: 100%; max-width: 220px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 14px 12px 11px; background: var(--white); border: 1px solid var(--line);
    border-radius: 16px; color: var(--ink); font-family: inherit; text-align: center;
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
  }
  .cap-card:active { transform: scale(.985); }
  .cap-card[data-cap='think'] { grid-area: 1 / 2; justify-self: center; width: 100%; }
  .cap-card[data-cap='hands'] { grid-area: 1 / 1; justify-self: start; }
  .cap-card[data-cap='eyes'] { grid-area: 1 / 3; justify-self: end; }
  .cap-card[data-cap='mouth'] { grid-area: 3 / 1; justify-self: start; }
  .cap-card[data-cap='ears'] { grid-area: 3 / 3; justify-self: end; }
  .cap-card .cap-ic {
    width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
    font-size: 27px; border: 2px solid var(--c); color: var(--c);
    box-shadow: 0 0 20px -7px var(--c); background: #fff;
  }
  .cap-card b { font-size: 19px; letter-spacing: .02em; margin-top: 3px; }
  .cap-card i { font-style: normal; font-size: 9.5px; letter-spacing: .18em; color: var(--muted); }
  .cap-card p { margin: 3px 0 0; font-size: 11.5px; color: var(--ink2); line-height: 1.45; }
  .cap-card .cap-cur {
    margin-top: 5px; max-width: 100%; font-size: 10.5px; color: var(--muted);
    background: #f4f6fa; border-radius: 999px; padding: 3px 9px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .cap-pet { grid-area: 2 / 2; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .cap-pet video {
    width: 100%; max-width: 240px; aspect-ratio: 16 / 10; object-fit: contain;
    border-radius: 18px; background: #0e1420; box-shadow: 0 10px 30px -14px rgba(15,23,42,.55);
  }
  .cap-pet span { font-size: 12px; color: var(--muted); }

  /* 能力菜单（底部弹出，桌面居中） */
  .cap-sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
  .cap-sheet-bg { position: absolute; inset: 0; background: rgba(15,23,42,.35); }
  .cap-sheet-panel {
    position: relative; width: min(560px, 100%); max-height: 78vh; overflow-y: auto;
    background: var(--white); border-radius: 18px 18px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 30px -12px rgba(15,23,42,.45);
  }
  .cap-sheet-head { display: flex; align-items: center; gap: 9px; }
  .cap-sheet-head .ic {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    font-size: 17px; border: 2px solid var(--c); color: var(--c);
  }
  .cap-sheet-head b { font-size: 17px; }
  .cap-sheet-head button {
    margin-left: auto; border: 0; width: 30px; height: 30px; border-radius: 50%;
    background: #f1f4f9; color: var(--ink2); font-size: 17px; line-height: 1;
  }
  .cap-sheet-sub { margin: 8px 0 11px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
  .cap-opt {
    display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 8px;
    padding: 11px 12px; text-align: left; font-family: inherit;
    border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  }
  .cap-opt .t { flex: 1; min-width: 0; }
  .cap-opt .t b { display: block; font-size: 14px; font-weight: 600; word-break: break-all; }
  .cap-opt .t span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
  .cap-opt .mark { font-size: 14px; font-weight: 700; color: var(--blue); }
  .cap-opt.on { border-color: #c7d7f5; background: var(--blue-soft); }
  .cap-opt[disabled] { opacity: .55; }
  .cap-del { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 4px 6px; }
  .cap-field { display: block; margin-bottom: 8px; }
  .cap-field span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
  .cap-field input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 11px; font-size: 13.5px; font-family: inherit; background: #fff; outline: none; }
  .cap-form-row { display: flex; gap: 8px; margin-top: 4px; }
  .cap-form-row button { flex: 1; height: 40px; border-radius: 10px; font-family: inherit; font-size: 13.5px; }
  .cap-ghost { border: 1px solid var(--line); background: #fff; color: var(--ink2); }
  .cap-primary { border: 0; background: var(--blue); color: #fff; font-weight: 600; }
  .cap-primary:disabled { opacity: .6; }
  @media (min-width: 761px) { .cap-sheet { align-items: center; } .cap-sheet-panel { border-radius: 18px; } }

  @media (max-width: 760px) {
    .cap-stage { align-items: flex-start; }
    .cap-inner { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto auto; gap: 8px; }
    .cap-links { display: none; }
    .cap-pet { grid-area: 1 / 1 / 2 / 3; }
    .cap-pet video { max-width: 200px; }
    .cap-card { max-width: none; padding: 12px 8px 10px; }
    .cap-card[data-cap='think'] { grid-area: 2 / 1 / 3 / 3; justify-self: stretch; }
    .cap-card[data-cap='hands'] { grid-area: 3 / 1; justify-self: stretch; }
    .cap-card[data-cap='eyes'] { grid-area: 3 / 2; justify-self: stretch; }
    .cap-card[data-cap='mouth'] { grid-area: 4 / 1; justify-self: stretch; }
    .cap-card[data-cap='ears'] { grid-area: 4 / 2; justify-self: stretch; }
    .cap-card .cap-ic { width: 48px; height: 48px; font-size: 22px; }
    .cap-card b { font-size: 17px; }
  }

  /* ---------- 插件页 ---------- */
  .pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
  .pl-card {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px;
    background: var(--white); border: 1px solid var(--line); border-radius: 14px; cursor: pointer;
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
  }
  .pl-card:active { transform: scale(.995); }
  .pl-ic {
    width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center;
    font-size: 23px; background: #f2f6fd; border: 1px solid #e3ecfa;
  }
  .pl-main { flex: 1; min-width: 0; }
  .pl-t { display: flex; align-items: baseline; gap: 7px; }
  .pl-t b { font-size: 15px; }
  .pl-ver { font-size: 10.5px; color: var(--muted); }
  .pl-main p { margin: 5px 0 0; font-size: 12px; color: var(--ink2); line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .pl-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
  .pl-badge { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: #f1f4f9; color: var(--muted); }
  .pl-badge.on { background: #e8f7ee; color: #177245; }
  .pl-cnt { font-size: 10.5px; color: var(--muted); }
  .pl-sw {
    width: 34px; height: 22px; border-radius: 999px; border: 0; background: #d7dce6; color: #fff;
    font-size: 10px; font-family: inherit;
  }
  .pl-sw.on { background: var(--blue); }
  .pl-tool { margin-bottom: 7px; }
  .pl-tool.need { opacity: .6; }
  .pl-form-title { font-size: 13px; font-weight: 600; margin: 2px 0 9px; }
  .pl-out {
    margin: 10px 0 0; padding: 11px 12px; max-height: 260px; overflow: auto;
    background: #0f172a; color: #d7e2f0; border-radius: 10px;
    font-family: Consolas, monospace; font-size: 11.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-all;
  }
  .bili-login { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding: 9px 11px; border: 1px dashed var(--line); border-radius: 11px; background: #fbfcfe; }
  .bl-state { flex: 1; min-width: 0; font-size: 12px; color: var(--ink2); }
  .bl-state.on { color: #177245; font-weight: 600; }
  .bl-btn { flex: none; border: 0; border-radius: 9px; height: 32px; padding: 0 14px; font-family: inherit; font-size: 12.5px; font-weight: 600; background: var(--blue); color: #fff; }
  .bl-qr img { display: block; width: 150px; height: 150px; background: #fff; border-radius: 10px; }
  .bl-tip { font-size: 12px; color: var(--muted); margin-bottom: 4px; line-height: 1.5; }

  /* ---------- 开发页 ---------- */
  .dev-wrap { flex: 1; min-height: 0; display: flex; gap: 12px; padding-bottom: 14px; }
  .dev-list { width: 262px; flex: none; overflow-y: auto; scrollbar-gutter: stable; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
  .dev-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; font-family: inherit; font-size: 12px; color: var(--ink2); padding: 6px 8px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dev-item.on { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
  .dev-item .sz { color: var(--muted); font-size: 10.5px; margin-left: 6px; }
  .dev-editor { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
  .dev-bar { display: flex; align-items: center; gap: 10px; }
  .dev-bar b { font-size: 13px; }
  .dev-hint { flex: 1; font-size: 11.5px; color: var(--muted); }
  .dev-bar button { height: 34px; padding: 0 16px; border: 0; border-radius: 9px; background: var(--blue); color: #fff; font-family: inherit; font-size: 13px; font-weight: 600; }
  .dev-bar button:disabled { opacity: .5; }
  .dev-bar button.dev-ghost { background: #fff; color: var(--ink2); border: 1px solid var(--line); font-weight: 500; }
  #dev-code { flex: 1; min-height: 0; width: 100%; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #0f172a; color: #d7e2f0; font-family: Consolas, monospace; font-size: 12.5px; line-height: 1.6; outline: none; }
  .dev-status { margin: 0; font-size: 11.5px; color: var(--muted); white-space: pre-wrap; max-height: 62px; overflow: auto; }
  .dev-logwrap { border-top: 1px solid var(--line); padding-top: 8px; }
  .dev-logwrap b { font-size: 12px; color: var(--ink2); }
  .dev-log { margin-top: 4px; max-height: 118px; overflow-y: auto; font-size: 11.5px; color: var(--ink2); scrollbar-gutter: stable; }
  .dev-log .row { display: flex; gap: 8px; padding: 3px 0; border-bottom: 1px dashed #eef2f7; }
  .dev-log .row .p { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dev-log .row .m { flex: none; color: var(--muted); }
  @media (max-width: 760px) {
    .dev-wrap { flex-direction: column; }
    .dev-list { width: auto; max-height: 150px; }
    #dev-code { min-height: 300px; }
  }

  /* ---------- 登录 ---------- */
  .login { position: fixed; inset: 0; background: var(--bg); z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; }
  .login h1 { margin: 0; font-size: 19px; }
  .login p { margin: 0; color: var(--muted); font-size: 13px; text-align: center; line-height: 1.6; }
  .login input { width: min(240px, 80vw); height: 50px; text-align: center; letter-spacing: 6px; font-size: 20px; border: 1px solid var(--line); border-radius: 13px; background: #fff; outline: none; }
  .login button { width: min(240px, 80vw); height: 46px; border: 0; border-radius: 13px; background: var(--blue); color: #fff; font-size: 15px; font-weight: 600; font-family: inherit; }
  .err { color: #dc2626; font-size: 13px; min-height: 18px; }

  /* 窄屏：侧栏折叠成图标条 */
  @media (max-width: 560px) {
    .sidebar { width: 68px; padding: 12px 6px; }
    .brand b, .brand span, .nav-group, .nav-item span:not(.ico) { display: none; }
    .nav-item { justify-content: center; }
  }

  /* 切回标签时的一次重绘踢：只影响根元素，视觉无变化 */
  .repaint-kick { outline: 1px solid transparent; }

  /* ---------- 服务状态灯 ---------- */
  .health { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-family: inherit; font-size: 11px; color: var(--muted); }
  .health .dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; display: block; }
  .health .dot.ok { background: #22c55e; }
  .health .dot.bad { background: #ef4444; }
  .health .dot.warn { background: #f59e0b; }
  .health #health-text { margin-left: 3px; }
  /* ---------- 桌宠数量告警条 ---------- */
  .health-warn { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 9px 12px; border-radius: 11px; background: #fff4e5; border: 1px solid #f6d8a8; color: #8a5300; font-size: 12.5px; }
  .health-warn span { flex: 1; min-width: 0; }
  .health-warn button { height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: #b45309; color: #fff; font-family: inherit; font-size: 12.5px; font-weight: 600; }
  /* ---------- 形象设计 ---------- */
  .skin-row { display: flex; align-items: flex-start; gap: 12px; }
  .skin-label { flex: 0 0 44px; font-size: 12.5px; color: var(--muted); padding-top: 7px; }
  .skin-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .skin-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-family: inherit; font-size: 12.5px; color: var(--text); }
  .skin-chip.on { border-color: var(--dsh-pet-accent, #4C8DF0); box-shadow: 0 0 0 2px rgba(76, 141, 240, .18); font-weight: 600; }
  .skin-chip i { width: 12px; height: 12px; border-radius: 50%; display: block; }
  /* ---------- 开发页：按时间排列的修改记录标签 ---------- */
  .dev-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 4px; scrollbar-width: thin; }
  .dev-tab { flex: 0 0 auto; min-width: 130px; max-width: 200px; text-align: left; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-family: inherit; cursor: pointer; }
  .dev-tab b { display: block; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dev-tab span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dev-tab.on { border-color: var(--dsh-pet-accent, #4C8DF0); box-shadow: 0 0 0 2px rgba(76, 141, 240, .16); }
  .dev-tab.on b { color: #2b6fd6; }
  .dev-detail { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; font-size: 12.5px; }
  .dev-detail .dd-row { display: flex; gap: 10px; padding: 3px 0; }
  .dev-detail .dd-row span { flex: 0 0 62px; color: var(--muted); }
  .dev-detail .dd-row b { flex: 1; min-width: 0; font-weight: 600; word-break: break-all; }
  .dev-detail .dd-note { margin-top: 6px; color: var(--muted); font-size: 11.5px; }
  /* ---------- 动作库：上传 / 改名 / 删除 ---------- */
  .act-upload { height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-family: inherit; font-size: 12.5px; cursor: pointer; }
  .act-upload:hover { border-color: var(--dsh-pet-accent, #4C8DF0); }
  .act-tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; z-index: 3; }
  .act-tool { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 7px; background: rgba(255, 255, 255, .86); font-size: 12px; cursor: pointer; line-height: 1; }
  .act-tool:hover { background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
  .act-card { position: relative; }