/* ==========================================================================
   装修 AI · 原型设计系统 v20
   Warm architectural neutral + clay accent. Single source of truth.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --paper: #faf8f4;
  --paper-2: #f3efe7;
  --paper-3: #ece7dc;
  --surface: #ffffff;
  --surface-2: #fbfaf7;

  --ink: #17160f;
  --ink-2: #3b3931;
  --muted: #79746a;
  --faint: #a9a396;
  --line: #e5e0d4;
  --line-2: #d6cfbe;
  --line-3: #bdb4a0;

  --clay: #bd5934;
  --clay-hover: #a94a28;
  --clay-soft: #f7e7de;
  --clay-line: #ecd0c1;

  --sage: #44614e;
  --sage-soft: #e6ede5;
  --sage-line: #cbdccd;

  --amber: #a3761e;
  --amber-soft: #f7eed8;
  --amber-line: #e8d7ae;

  --danger: #ac3a2c;
  --danger-soft: #f8e5e2;
  --danger-line: #edc9c3;

  --info: #35597f;
  --info-soft: #e6edf4;
  --info-line: #cadbee;

  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;

  --sh-1: 0 1px 2px rgba(23, 22, 15, 0.05);
  --sh-2: 0 6px 20px -10px rgba(23, 22, 15, 0.22), 0 1px 2px rgba(23, 22, 15, 0.04);
  --sh-3: 0 22px 60px -28px rgba(23, 22, 15, 0.34), 0 2px 6px rgba(23, 22, 15, 0.05);
  --sh-inset: inset 0 0 0 1px var(--line);

  --font: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, "Cascadia Mono", Menlo, monospace;

  --topbar: 56px;
  --rail: 224px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, p { margin: 0; }
::selection { background: var(--clay-soft); color: var(--clay-hover); }

/* scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--line-3); background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- 2. Type utilities ---------- */
.display {
  font-size: clamp(34px, 3.7vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.h1 { font-size: 32px; line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; }
.h2 { font-size: 24px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 600; }
.h3 { font-size: 18px; line-height: 1.4; letter-spacing: -0.01em; font-weight: 600; }
.h4 { font-size: 15px; line-height: 1.45; font-weight: 600; }
.lead { font-size: 16px; line-height: 1.65; color: var(--muted); }
.sm { font-size: 12.5px; }
.xs { font-size: 11.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: -0.01em; }
.strong { font-weight: 600; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--line-3);
}
.eyebrow.plain::before { display: none; }

/* ---------- 3. Layout helpers ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.hide { display: none !important; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.vdivider { width: 1px; align-self: stretch; background: var(--line); }

.container { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
.container.narrow { width: min(980px, calc(100% - 64px)); }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.16s, border-color 0.16s, color 0.16s, box-shadow 0.16s, transform 0.1s;
}
.btn:active { transform: translateY(0.5px); }
.btn svg { width: 15px; height: 15px; flex: none; }

.btn-primary { background: var(--ink); color: #fdfbf7; border-color: var(--ink); }
.btn-primary:hover { background: #2c2a20; }

.btn-clay { background: var(--clay); color: #fff; border-color: var(--clay); }
.btn-clay:hover { background: var(--clay-hover); border-color: var(--clay-hover); }

.btn-outline { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--line-3); background: var(--surface-2); }

.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper-2); }

.btn-quiet { background: var(--paper-2); color: var(--ink-2); }
.btn-quiet:hover { background: var(--paper-3); }

.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: #f5d9d5; }

.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: var(--r-xs); }
.btn-lg { height: 46px; padding: 0 24px; font-size: 14.5px; border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: var(--r-xs); color: var(--muted); }
.btn-icon:hover { background: var(--paper-2); color: var(--ink); }
.btn-icon svg { width: 16px; height: 16px; }

/* ---------- 5. Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 500; color: var(--muted); }

.input, .textarea, .select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(189, 89, 52, 0.12);
}
.textarea { resize: vertical; min-height: 76px; line-height: 1.6; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 8l3-3.5' stroke='%2379746a' fill='none' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.input-sm { padding: 6px 9px; font-size: 12.5px; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--faint);
}
.search input { border: 0; outline: none; background: none; flex: 1; min-width: 0; font-size: 13px; color: var(--ink); }
.search svg { width: 14px; height: 14px; }

/* switch */
.switch {
  width: 36px; height: 20px; border-radius: 99px; background: var(--line-2);
  position: relative; flex: none; transition: background 0.18s; cursor: pointer;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform 0.18s;
}
.switch[data-on="true"] { background: var(--sage); }
.switch[data-on="true"]::after { transform: translateX(16px); }

/* checkbox */
.check {
  width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--line-3);
  background: var(--surface); flex: none; display: inline-grid; place-items: center; cursor: pointer;
}
.check[data-on="true"] { background: var(--ink); border-color: var(--ink); }
.check[data-on="true"]::after {
  content: ""; width: 8px; height: 4px; border-left: 1.6px solid #fff; border-bottom: 1.6px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

/* ---------- 6. Chips / badges / tags ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 99px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.badge-neutral { background: var(--paper-2); color: var(--muted); border-color: var(--line); }
.badge-clay { background: var(--clay-soft); color: var(--clay-hover); border-color: var(--clay-line); }
.badge-sage { background: var(--sage-soft); color: var(--sage); border-color: var(--sage-line); }
.badge-amber { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.badge-ink { background: var(--ink); color: #fdfbf7; }
.badge-plain { background: transparent; border-color: var(--line-2); color: var(--muted); }

.badge .pulse {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.3; transform: scale(0.75); } }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 12.5px; color: var(--ink-2); cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.chip:hover { border-color: var(--line-3); }
.chip[data-on="true"] { background: var(--ink); border-color: var(--ink); color: #fdfbf7; }
.chip .x { opacity: 0.5; font-size: 14px; line-height: 1; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 2px 6px; border-radius: 4px;
  background: var(--paper-2); color: var(--muted);
}

/* ---------- 7. Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}
.card-pad { padding: 20px; }
.card-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.card-hd h3 { font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em; }
.card-bd { padding: 18px; }
.card-ft { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-md) var(--r-md); }

.panel { background: var(--paper-2); border-radius: var(--r-md); padding: 14px; }

/* ---------- 8. Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 500; font-size: 11.5px; letter-spacing: 0.04em;
  color: var(--faint); text-transform: uppercase; padding: 9px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2);
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .right { text-align: right; }
.table .num { font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* ---------- 9. Tabs / segmented ---------- */
.tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); }
.tab {
  position: relative; padding: 9px 13px; font-size: 13px; color: var(--muted);
  font-weight: 500; white-space: nowrap; transition: color 0.15s;
}
.tab:hover { color: var(--ink); }
.tab[data-on="true"] { color: var(--ink); }
.tab[data-on="true"]::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 1.5px;
  background: var(--ink); border-radius: 2px;
}
.tab .count { font-size: 11px; color: var(--faint); margin-left: 4px; font-variant-numeric: tabular-nums; }

.seg {
  display: inline-flex; padding: 3px; background: var(--paper-2);
  border-radius: var(--r-sm); gap: 2px;
}
.seg button {
  height: 28px; padding: 0 11px; border-radius: 6px; font-size: 12.5px;
  color: var(--muted); font-weight: 500; transition: all 0.15s; white-space: nowrap;
}
.seg button[data-on="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

/* ---------- 10. Avatars / media ---------- */
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
  background: var(--paper-3); color: var(--ink-2); overflow: hidden;
}
.avatar.lg { width: 38px; height: 38px; font-size: 13px; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.avatar.clay { background: var(--clay-soft); color: var(--clay-hover); }
.avatar.sage { background: var(--sage-soft); color: var(--sage); }
.avatar.info { background: var(--info-soft); color: var(--info); }
.avatar.amber { background: var(--amber-soft); color: var(--amber); }

.thumb { border-radius: var(--r-sm); overflow: hidden; background: var(--paper-2); position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 11. Meters / progress ---------- */
.meter { height: 5px; border-radius: 99px; background: var(--paper-3); overflow: hidden; display: flex; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--ink); }
.meter > i.clay { background: var(--clay); }
.meter > i.sage { background: var(--sage); }
.meter > i.amber { background: var(--amber); }
.meter > i.ghost { background: var(--line-3); }

.progress { height: 4px; border-radius: 99px; background: var(--paper-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--clay); border-radius: 99px; transition: width 0.4s ease; }

/* ---------- 12. KPI ---------- */
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi .k-label { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.kpi .k-value { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .k-value small { font-size: 12px; font-weight: 500; color: var(--faint); letter-spacing: 0; margin-left: 3px; }
.kpi .k-foot { font-size: 11.5px; color: var(--faint); }

/* ---------- 13. Modal / drawer ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(23, 22, 15, 0.42);
  backdrop-filter: blur(3px); z-index: 900; display: none;
  align-items: center; justify-content: center; padding: 24px;
  animation: fade 0.18s ease;
}
.overlay.open { display: flex; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface); border-radius: var(--r-lg);
  width: min(520px, 100%); box-shadow: var(--sh-3);
  border: 1px solid var(--line); overflow: hidden;
  animation: rise 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.modal.wide { width: min(760px, 100%); }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }

.modal-hd { padding: 18px 20px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-bd { padding: 16px 20px; }
.modal-ft { padding: 14px 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 92vw);
  background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px -30px rgba(23,22,15,.4); z-index: 910;
  transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.3, 0.8, 0.3, 1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-hd { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-bd { padding: 20px; overflow-y: auto; flex: 1; }

/* ---------- 14. Toast ---------- */
.toast-host { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 980; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--ink); color: #fdfbf7; padding: 9px 16px; border-radius: 99px;
  font-size: 12.5px; box-shadow: var(--sh-3); display: flex; align-items: center; gap: 8px;
  animation: toastIn 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast .dot { width: 5px; height: 5px; border-radius: 50%; background: #9dc7a4; }

/* ---------- 15. Empty ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 48px 24px; color: var(--faint); text-align: center; }
.empty .ico { width: 40px; height: 40px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; color: var(--faint); margin-bottom: 4px; }

/* ---------- 16. Marketing header ---------- */
.site-hd {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 244, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-hd .inner { height: 64px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -0.02em; font-size: 15px; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: #faf8f4;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: 0;
}
.site-nav { display: flex; gap: 26px; font-size: 13.5px; color: var(--muted); }
.site-nav a { transition: color 0.15s; }
.site-nav a:hover, .site-nav a[data-on="true"] { color: var(--ink); }

/* ---------- 17. App shell ---------- */
.app { min-height: 100vh; background: var(--paper); }
.topbar {
  height: var(--topbar); position: sticky; top: 0; z-index: 200;
  background: rgba(250, 248, 244, 0.9); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 18px;
}
.workspace-switch {
  display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 10px 0 8px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface);
  font-size: 13px; font-weight: 500; transition: border-color 0.15s;
}
.workspace-switch:hover { border-color: var(--line-3); }
.workspace-switch .ws-ico {
  width: 20px; height: 20px; border-radius: 5px; background: var(--ink); color: #faf8f4;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
}
.workspace-switch .ws-ico.ent { background: var(--clay); }
.workspace-switch .caret { color: var(--faint); font-size: 9px; }

.credit-pill {
  display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px;
  border-radius: var(--r-sm); background: var(--paper-2); font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.credit-pill b { font-weight: 600; }
.credit-pill .lbl { color: var(--muted); font-size: 11.5px; }

.rail {
  width: var(--rail); flex: none; border-right: 1px solid var(--line);
  padding: 14px 12px; display: flex; flex-direction: column; gap: 2px;
  background: var(--paper); position: sticky; top: var(--topbar);
  height: calc(100vh - var(--topbar)); overflow-y: auto;
}
.rail-sec { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 6px; font-weight: 600; }
.rail a {
  display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 10px;
  border-radius: var(--r-xs); font-size: 13px; color: var(--ink-2);
  transition: background 0.14s, color 0.14s; position: relative;
}
.rail a:hover { background: var(--paper-2); }
.rail a[data-on="true"] { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--sh-1); border: 1px solid var(--line); }
.rail a[data-on="true"] .r-ico { color: var(--clay); }
.rail .r-ico { width: 15px; height: 15px; color: var(--faint); flex: none; }
.rail .r-badge { margin-left: auto; font-size: 10.5px; background: var(--clay); color: #fff; border-radius: 99px; padding: 0 5px; height: 16px; line-height: 16px; }

.shell { display: flex; align-items: flex-start; }
.main { flex: 1; min-width: 0; padding: 26px 30px 60px; }
.main.flush { padding: 0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }

/* ---------- 18. Tool cards ---------- */
.tool-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s; cursor: pointer;
}
.tool-card:hover { border-color: var(--line-2); box-shadow: var(--sh-2); transform: translateY(-1px); }
.tool-card .t-name { font-size: 13px; font-weight: 500; }
.tool-card .t-desc { font-size: 11.5px; color: var(--faint); line-height: 1.45; }
.tool-card .t-id { position: absolute; top: 12px; right: 12px; font-family: var(--mono); font-size: 9.5px; color: var(--faint); opacity: 0.7; }
.tool-card[data-on="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.tool-card .t-ico {
  width: 30px; height: 30px; border-radius: 8px; background: var(--paper-2);
  display: grid; place-items: center; margin-bottom: 8px; color: var(--ink-2);
}
.tool-card[data-on="true"] .t-ico { background: var(--ink); color: #faf8f4; }

/* ---------- 19. Chat ---------- */
.chat { display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 9px; }
.msg .bubble {
  background: var(--paper-2); border-radius: 4px 10px 10px 10px;
  padding: 9px 12px; font-size: 13px; line-height: 1.6; color: var(--ink-2);
  max-width: 100%;
}
.msg.user { flex-direction: row-reverse; }
.msg.user .bubble { background: var(--ink); color: #f6f3ec; border-radius: 10px 4px 10px 10px; }
.msg .meta { font-size: 10.5px; color: var(--faint); margin-top: 4px; }

/* ---------- 20. Misc ---------- */
.link { color: var(--clay); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 2px; }

.rule-label {
  display: flex; align-items: center; gap: 10px; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
}
.rule-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.hide-scroll::-webkit-scrollbar { display: none; }

@media (max-width: 1180px) {
  .g6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .container, .container.narrow { width: calc(100% - 40px); }
  .rail { display: none; }
  .main { padding: 18px; }
  .g4, .g5, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { display: none; }
}

/* ---------- 21. 固定比例容器内的图片：绝对定位，避免内容撑高盒子 ---------- */
.entry-card img, .hero-frame img, .hero-lib .th img, .asset .a-img img,
.proj-card .p-cover img, .proj-tile .pt-cover img, .shot .s-img img,
.tl-clip img, .player img, .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
