/* AI 电商 · 功能卡首页（卡片墙）
   与模特图 / 工具箱同一套版式：1700 容器 / 118 卡片图 / 直角 / 设计令牌配色。 */

/* 卡片墙模式下先不渲染三栏工作台，避免首屏闪一下再切 */
html.eh-mode .wb { display: none !important; }
html.eh-mode body { overflow-x: hidden; }

.eh {
  width: 100%;
  max-width: 1700px;
  margin: 0 auto;
  min-height: calc(100vh - 66px);
  box-sizing: border-box;
  padding: 16px 24px 52px;
}
html.embed .eh { min-height: 100vh; padding-top: 20px; }
html.embed .topbar { display: none !important; }
html.embed body.has-topbar { padding-top: 0; }

/* ══════════ hero ══════════ */
.eh-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px 24px;
  align-items: end;
  padding: 22px 28px;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  position: relative;
  overflow: hidden;
}
.eh-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 44%, color-mix(in srgb, var(--err) 4%, transparent) 100%);
}
.eh-kicker {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--err);
}
.eh-hero h1 {
  margin: 0 0 10px;
  display: inline-block;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--ink);
  background-image: linear-gradient(var(--err), var(--err));
  background-repeat: no-repeat;
  background-size: 100% 6px;
  background-position: 0 88%;
}
.eh-sub {
  margin: 0 0 18px;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-60);
}
.eh-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(440px, 100%);
  height: 42px;
  padding: 0 14px;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-40);
}
.eh-search:focus-within { border-color: var(--ink); }
.eh-search svg { flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.eh-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
}
.eh-search input::placeholder { color: var(--ink-40); }

.eh-hero-r {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  color: var(--ink-40);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.eh-dot { width: 5px; height: 5px; background: var(--ink-40); display: inline-block; }

/* ══════════ 分区标题 ══════════ */
.eh-sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-strong);
}
.eh-sec-head > i {
  flex: 0 0 4px;
  width: 4px;
  height: 17px;
  background: var(--err);
  display: block;
}
.eh-sec-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink);
}
.eh-sec-head .n {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--ink-40);
}
.eh-sec-head .n b { font-weight: 400; color: var(--ink-60); }
.eh-sec { margin: 0 0 30px; }
.eh-sec[hidden] { display: none; }

/* ══════════ 卡片 ══════════ */
.eh-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.eh-card {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px 10px 10px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.eh-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(40, 50, 80, .08);
  border-color: var(--line-strong);
}
.eh-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.eh-card[hidden] { display: none; }
.eh-card.is-locked { cursor: default; }
.eh-card.is-locked .eh-art { color: var(--ink-40); }
.eh-card.is-locked .eh-t { color: var(--ink-60); }

.eh-art {
  position: relative;
  display: block;
  width: 118px;
  height: 118px;
  border: 1px solid var(--line);
  background-color: var(--paper-deep);
  background-image:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--ink) 4%, transparent), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 29px, color-mix(in srgb, var(--line) 72%, transparent) 29px 30px),
    repeating-linear-gradient(90deg, transparent 0 29px, color-mix(in srgb, var(--line) 72%, transparent) 29px 30px);
  color: var(--ink);
  overflow: hidden;
  transition: border-color .16s ease, background-color .16s ease;
}
.eh-art svg { display: block; width: 100%; height: 100%; transition: transform .32s ease; }
.eh-card:hover .eh-art { border-color: var(--line-strong); background-color: var(--bg-raised); }
.eh-card:hover .eh-art svg { transform: scale(1.045); }

.eh-body { min-width: 0; }
.eh-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 20px;
  margin-bottom: 5px;
}
.eh-t {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--ink);
}
.eh-hot {
  flex: none;
  padding: 1px 5px;
  background: var(--err);
  color: #fff;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .04em;
  line-height: 1.5;
}
html[data-theme="dark"] .eh-hot { color: #16150F; }
.eh-tag {
  flex: none;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  color: var(--ink-40);
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .05em;
  line-height: 1.5;
  white-space: nowrap;
}
.eh-d {
  margin: 0 0 7px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-60);
  min-height: calc(1.5em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.eh-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.eh-tags i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: .05em;
  color: var(--ink-40);
  border: 1px solid var(--line);
  padding: 1px 4px;
  white-space: nowrap;
}
.eh-arrow {
  position: absolute;
  right: 11px;
  bottom: 8px;
  font-style: normal;
  font-size: 12px;
  color: var(--ink-40);
  transition: transform .16s ease, color .16s ease;
}
.eh-card:hover .eh-arrow { transform: translateX(3px); color: var(--ink); }
.eh-card.is-locked .eh-arrow { display: none; }
.eh-note {
  position: absolute;
  left: 10px;
  right: 12px;
  bottom: -1px;
  padding: 3px 6px;
  background: var(--err);
  color: #fff;
  font-size: 10.5px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .14s, transform .14s;
  pointer-events: none;
}
html[data-theme="dark"] .eh-note { color: #16150F; }
.eh-card.show-note .eh-note { opacity: 1; transform: translateY(0); }

.eh-empty {
  margin: 22px 0 0;
  padding: 26px 0;
  text-align: center;
  color: var(--ink-40);
  font-size: 13px;
  border: 1px dashed var(--line-strong);
}
.eh-empty[hidden] { display: none; }

/* ══════════ 工作台返回按钮：带文字「功能列表」 ══════════ */
.wb-back {
  width: auto;
  height: 26px;
  padding: 0 9px 0 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* ══════════ 断点 ══════════ */
@media (max-width: 1280px) {
  .eh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .eh { padding: 12px 16px 40px; }
  .eh-hero { grid-template-columns: 1fr; padding: 18px 16px; }
  .eh-hero h1 { font-size: 30px; }
  .eh-hero-r { padding: 0; }
  .eh-grid { grid-template-columns: 1fr; }
  .eh-card { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
  .eh-art { width: 88px; height: 88px; }
  .eh-t { font-size: 14px; }
  .eh-arrow { display: none; }
}
