/* =====================================================================
   提示词工坊 · 设计系统
   风格取向：苹果式留白与大字号、克制的层次、工具化的信息密度。
   ===================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --panel: #ffffff;
  --panel-2: #f5f5f7;
  --panel-3: #ececef;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, 0.09);
  --line-strong: rgba(0, 0, 0, 0.16);
  --accent: #4f46e5;
  --accent-2: #0ea5e9;
  --accent-ink: #ffffff;
  --accent-soft: #eef0ff;
  --accent-line: rgba(79, 70, 229, 0.28);
  --ok: #34c759;
  --warn: #ff9f0a;
  --danger: #ff3b30;

  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-3: 0 18px 48px rgba(0, 0, 0, 0.1);

  --nav-h: 52px;
  --maxw: 1320px;
}

html[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #0a0a0b;
  --panel: #1c1c1e;
  --panel-2: #232325;
  --panel-3: #2c2c2e;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #8b86ff;
  --accent-2: #38bdf8;
  --accent-ink: #0a0a14;
  --accent-soft: #1d1b3a;
  --accent-line: rgba(139, 134, 255, 0.4);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 6px 22px rgba(0, 0, 0, 0.55);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, 0.7);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------------------------------------------------------------- 通用 */

.boot {
  min-height: 80vh;
  display: grid;
  place-content: center;
  gap: 16px;
  justify-items: center;
  color: var(--text-3);
}

.boot__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  animation: boot-pulse 1.1s ease-in-out infinite;
}

@keyframes boot-pulse {
  0%,
  100% {
    transform: scale(0.86);
    opacity: 0.55;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

.stack {
  display: grid;
  gap: 18px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row--between {
  justify-content: space-between;
}

.row--wrap {
  flex-wrap: wrap;
}

.grow {
  flex: 1;
  min-width: 0;
}

.muted {
  color: var(--text-2);
}

.dim {
  color: var(--text-3);
}

.mono {
  font-family: var(--font-mono);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ------------------------------------------------------------- 顶部导航 */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__mark {
  width: 26px;
  height: 26px;
  flex: none;
  display: block;
}

.brand__mark svg {
  display: block;
  border-radius: 6px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav__links::-webkit-scrollbar {
  display: none;
}

.nav__link {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text-2);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.nav__link:hover {
  color: var(--text);
  background: var(--panel-2);
}

.nav__link.is-active {
  color: var(--text);
  background: var(--panel-3);
  font-weight: 500;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn:hover {
  background: var(--panel-2);
  border-color: var(--line-strong);
}

.btn:active {
  transform: scale(0.975);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: var(--shadow-1);
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #000);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}

.btn--ghost:hover {
  background: var(--panel-2);
  color: var(--text);
}

.btn--sm {
  height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
}

.btn--lg {
  height: 46px;
  padding: 0 26px;
  font-size: 15px;
}

.btn--block {
  width: 100%;
}

.btn--icon {
  width: 36px;
  padding: 0;
}

.btn--icon.btn--sm {
  width: 30px;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- 卡片 */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}

.card__pad {
  padding: 18px;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__title::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--accent);
}

/* ------------------------------------------------------------- 表单控件 */

.field {
  display: grid;
  gap: 7px;
}

.label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.label__hint {
  color: var(--text-3);
  font-weight: 400;
}

.input,
.select,
.textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 9px 12px;
  outline: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.input:hover,
.select:hover,
.textarea:hover {
  background: var(--panel-3);
}

.input:focus,
.select:focus,
.textarea:focus {
  background: var(--panel);
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.6;
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%),
    linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  user-select: none;
}

.switch input {
  /* 视觉隐藏但保留可聚焦，键盘也能操作 */
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

.switch:focus-within .switch__track {
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.switch__track {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--panel-3);
  position: relative;
  transition: background 0.18s;
  flex: none;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s;
}

.switch input:checked + .switch__track {
  background: var(--accent);
}

.switch input:checked + .switch__track::after {
  transform: translateX(16px);
}

/* ------------------------------------------------------------- 芯片/标签 */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.14s;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.chip.is-active {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 500;
}

.chip__count {
  font-size: 11px;
  opacity: 0.6;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--panel-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
}

.badge--accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge--ok {
  background: color-mix(in srgb, var(--ok) 16%, transparent);
  color: var(--ok);
}

.badge--warn {
  background: color-mix(in srgb, var(--warn) 18%, transparent);
  color: var(--warn);
}

.badge--lock {
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  color: color-mix(in srgb, var(--warn) 78%, var(--text));
}

/* 访客视图：内容看得到，但用不了 */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 15px;
  margin-bottom: 16px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: color-mix(in srgb, var(--accent) 82%, var(--text));
  font-size: 13px;
  line-height: 1.65;
}

.notice .icon {
  margin-top: 2px;
  flex: none;
}

.notice a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.lib-card__prompt.is-locked,
.prompt-box.is-locked {
  position: relative;
  color: var(--text-3);
  -webkit-mask-image: linear-gradient(90deg, #000 62%, rgba(0, 0, 0, 0.35));
  mask-image: linear-gradient(90deg, #000 62%, rgba(0, 0, 0, 0.35));
  cursor: pointer;
}

.lib-card__prompt.is-locked::after {
  content: "🔒";
  position: absolute;
  right: 2px;
  bottom: 0;
  font-size: 12px;
  filter: grayscale(1);
}

/* ---------------------------------------------------------------- 分段控件 */

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--panel-2);
  border-radius: 10px;
}

.segmented__item {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 6px 13px;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.segmented__item:hover {
  color: var(--text);
}

.segmented__item.is-active {
  background: var(--panel);
  color: var(--text);
  font-weight: 500;
  box-shadow: var(--shadow-1);
}

/* ---------------------------------------------------------------- 网格 */

.grid {
  display: grid;
  gap: 14px;
}

.grid--auto {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.grid--cards {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid--tight {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

/* ------------------------------------------------------------- 首页 */

.hero {
  padding: 76px 0 52px;
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero__title {
  margin: 0;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.032em;
  font-weight: 600;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  max-width: 660px;
  margin: 20px auto 0;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text-2);
  line-height: 1.62;
}

.hero__cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 56px;
}

.stat {
  background: var(--panel);
  padding: 22px 20px;
  text-align: center;
}

.stat__num {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.stat__label {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 3px;
}

.section {
  padding: 56px 0;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section__title {
  margin: 0;
  font-size: clamp(23px, 3vw, 32px);
  letter-spacing: -0.024em;
  font-weight: 600;
}

.section__sub {
  margin: 7px 0 0;
  color: var(--text-2);
  font-size: 14px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.step__num {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.step__title {
  margin: 10px 0 6px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.step__text {
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
}

.feature {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.feature__card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
}

.feature__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

/* ---------------------------------------------------------------- 创作台 */

.studio {
  display: grid;
  grid-template-columns: 372px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0 60px;
  align-items: start;
}

@media (max-width: 1080px) {
  .studio {
    grid-template-columns: 1fr;
  }
}

.studio__rail {
  position: sticky;
  top: calc(var(--nav-h) + 14px);
  max-height: calc(100vh - var(--nav-h) - 28px);
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding-right: 4px;
}

.studio__rail::-webkit-scrollbar {
  width: 8px;
}

.studio__rail::-webkit-scrollbar-thumb {
  background: var(--panel-3);
  border-radius: 4px;
}

.rail-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px;
  display: grid;
  gap: 12px;
}

.rail-block__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rail-block__title small {
  font-weight: 400;
  color: var(--text-3);
  font-size: 11.5px;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 268px;
  overflow-y: auto;
  padding-right: 4px;
}

.style-card {
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 0;
  overflow: hidden;
  background: var(--panel-2);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.style-card__swatch {
  height: 52px;
  display: block;
}

.style-card__name {
  display: block;
  padding: 6px 7px 7px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-2);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.style-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.style-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.style-card.is-active .style-card__name {
  color: var(--accent);
  font-weight: 600;
}

.param-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.param-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ---------------------------------------------------------------- 结果区 */

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.result-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.shot {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.18s;
}

.shot:hover {
  box-shadow: var(--shadow-2);
}

.shot__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.shot__index {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex: none;
}

.shot__label {
  font-size: 13px;
  font-weight: 600;
}

.shot__body {
  padding: 15px;
  display: grid;
  gap: 12px;
}

.prompt-box {
  position: relative;
  background: var(--panel-2);
  border-radius: var(--r-sm);
  padding: 12px 13px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.66;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow-y: auto;
}

.prompt-box--zh {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-2);
}

.prompt-box__tag {
  position: absolute;
  top: 9px;
  right: 11px;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--text-3);
  background: var(--panel);
  padding: 1px 6px;
  border-radius: 4px;
}

.params-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: 54px 24px;
  text-align: center;
  color: var(--text-2);
  background: var(--panel);
}

.empty__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--text-3);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}

.empty__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 5px;
}

.empty__text {
  margin: 0 auto;
  max-width: 420px;
  font-size: 13px;
}

/* ---------------------------------------------------------------- 提示词库 */

.lib {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0 60px;
  align-items: start;
}

@media (max-width: 980px) {
  .lib {
    grid-template-columns: 1fr;
  }
}

.facet {
  position: sticky;
  top: calc(var(--nav-h) + 14px);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - var(--nav-h) - 28px);
  overflow-y: auto;
}

.facet__block {
  display: grid;
  gap: 3px;
}

.facet__title {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.facet__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s;
}

.facet__item:hover {
  background: var(--panel-2);
  color: var(--text);
}

.facet__item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.facet__count {
  font-size: 11px;
  color: var(--text-3);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search .icon {
  position: absolute;
  left: 13px;
  color: var(--text-3);
  pointer-events: none;
}

.search .input {
  height: 42px;
  border-radius: 12px;
  padding-left: 40px;
  padding-right: 90px;
  font-size: 14px;
}

.search__kbd {
  position: absolute;
  right: 12px;
  font-size: 11px;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--panel);
  font-family: var(--font-mono);
}

.lib-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
  transition: box-shadow 0.18s, border-color 0.18s;
}

.lib-card:hover {
  box-shadow: var(--shadow-2);
  border-color: var(--line-strong);
}

.lib-card__title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lib-card__prompt {
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-mono);
  word-break: break-word;
}

.lib-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  margin-top: 2px;
}

/* ---------------------------------------------------------------- 拼装台 */

.builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 20px;
  padding: 22px 0 60px;
  align-items: start;
}

@media (max-width: 1080px) {
  .builder {
    grid-template-columns: 1fr;
  }
}

.tag-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 29px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.13s;
}

.tag:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.tag.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
  font-weight: 500;
}

.tag__en {
  font-size: 11px;
  color: var(--text-3);
}

.tag.is-active .tag__en {
  color: color-mix(in srgb, var(--accent) 70%, transparent);
}

.selected-list {
  display: grid;
  gap: 7px;
  max-height: 190px;
  overflow-y: auto;
}

.selected {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--panel-2);
  font-size: 12.5px;
}

.selected__x {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 2px;
  border-radius: 5px;
}

.selected__x:hover {
  background: var(--panel-3);
  color: var(--danger);
}

/* ---------------------------------------------------------------- 弹层 */

.modal-host {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.16s ease-out;
}

.modal {
  background: var(--panel);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  width: min(760px, 100%);
  max-height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-in 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.modal__body {
  padding: 20px 22px;
  overflow-y: auto;
  display: grid;
  gap: 16px;
}

.modal__foot {
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

/* ---------------------------------------------------------------- 提示条 */

.toast-host {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 300;
  display: grid;
  gap: 8px;
  justify-items: center;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  background: color-mix(in srgb, var(--text) 92%, transparent);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-3);
  animation: toast-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast--err {
  background: var(--danger);
  color: #fff;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ---------------------------------------------------------------- 其他 */

.skel {
  background: linear-gradient(90deg, var(--panel-2) 25%, var(--panel-3) 37%, var(--panel-2) 63%);
  background-size: 400% 100%;
  animation: skel 1.3s ease infinite;
  border-radius: 8px;
}

@keyframes skel {
  from {
    background-position: 100% 50%;
  }
  to {
    background-position: 0 50%;
  }
}

.spin {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--text-2);
  background: var(--panel-2);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 46px;
  color: var(--text-3);
  font-size: 12.5px;
}

.footer__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 15px;
  }
  .hero {
    padding: 44px 0 30px;
  }
  .section {
    padding: 36px 0;
  }
  .card__pad {
    padding: 15px;
  }
  .modal {
    border-radius: var(--r-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* =====================================================================
   账号、权限门与法律页
   ===================================================================== */

.lockbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  background: color-mix(in srgb, var(--warn) 16%, var(--panel));
  color: color-mix(in srgb, var(--warn) 85%, var(--text));
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
}

.gate {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 46px 32px;
  box-shadow: var(--shadow-2);
}

.gate__icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
}

.gate h2 {
  margin: 0 0 10px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.gate p {
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.7;
}

/* ---------------------------------------------------------------- 登录注册 */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

@media (max-width: 900px) {
  .auth {
    grid-template-columns: 1fr;
  }
}

.auth__card,
.auth__aside {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 34px;
  box-shadow: var(--shadow-2);
}

.auth__title {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.auth__sub {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 14px;
}

.auth__error {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-size: 13px;
}

.auth__foot {
  margin: 20px 0 0;
  font-size: 13.5px;
  color: var(--text-2);
}

.auth__foot a {
  color: var(--accent);
}

.auth__aside h2 {
  margin: 0 0 16px;
  font-size: 18px;
  letter-spacing: -0.015em;
}

.auth__aside ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.auth__aside li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-2);
}

.auth__aside li .icon {
  color: var(--ok);
}

.auth__steps {
  margin: 0;
  padding-left: 20px;
  list-style: decimal;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.7;
}

.auth__steps li {
  margin-bottom: 14px;
}

.auth__steps li::marker {
  color: var(--accent);
  font-weight: 600;
}

.auth__steps strong {
  color: var(--text);
}

.auth__note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--panel-2);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.6;
}

.sponsor-btn {
  margin-top: 20px;
}

.sponsor-url {
  margin: 10px 0 0;
  font-size: 12px;
  text-align: center;
  word-break: break-all;
}

.sponsor-url strong {
  color: var(--accent);
}

.sponsor-inline {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

/* 每日 AI 额度提示 */
.quota {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 9px;
  padding: 7px 10px;
  border-radius: var(--r-xs);
  background: var(--panel-2);
  color: var(--text-2);
  font-size: 11.5px;
  text-align: center;
}

.quota strong {
  color: var(--accent);
}

.quota small {
  color: var(--text-3);
}

.quota .is-warn {
  color: var(--warn);
}

.quota .is-warn strong {
  color: var(--warn);
}

.quota-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--panel-3);
  overflow: hidden;
}

.quota-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s;
}

/* 管理后台的每日用量柱状图 */
.usagebars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
}

.usagebar {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.usagebar__track {
  width: 100%;
  height: 96px;
  border-radius: 8px;
  background: var(--panel-2);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.usagebar__fill {
  width: 100%;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  transition: height 0.3s;
}

.usagebar__value {
  font-size: 12px;
  font-weight: 600;
}

.usagebar__day {
  font-size: 11px;
  color: var(--text-3);
}

/* ---------------------------------------------------------------- 法律页 */

.legal {
  max-width: 800px;
  padding: 40px 0 70px;
}

.legal__head {
  margin-bottom: 26px;
}

.legal__head h1 {
  margin: 12px 0 0;
  font-size: clamp(27px, 4vw, 36px);
  letter-spacing: -0.028em;
}

.legal__lead {
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.75;
}

.legal__body {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 34px;
}

.legal__body section + section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.legal__body h2 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.legal__body p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-2);
}

.legal__body p:last-child {
  margin-bottom: 0;
}

.legal__foot {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ---------------------------------------------------------------- 账号菜单 */

.account-menu {
  position: fixed;
  top: calc(var(--nav-h) - 4px);
  right: 20px;
  z-index: 120;
  width: 236px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: modal-in 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-menu__head {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 3px;
}

.account-menu__head strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu__head span {
  font-size: 11.5px;
}

.account-menu__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 15px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.account-menu__item:hover {
  background: var(--panel-2);
  color: var(--text);
}

/* ---------------------------------------------------------------- 激活码 */

.codegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 9px 11px;
  border-radius: var(--r-xs);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: all 0.14s;
}

.code:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------------------------------------------------------------- 表格 */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-2);
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.table tr:last-child td {
  border-bottom: 0;
}

/* ---------------------------------------------------------------- 反扒遮罩 */

.shield {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 24px;
}

.shield__box {
  max-width: 460px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 34px 30px;
  box-shadow: var(--shadow-3);
}

.shield__box strong {
  display: block;
  font-size: 17px;
  margin-bottom: 10px;
}

.shield__box p {
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.7;
}

html.is-shielded #app {
  filter: blur(14px);
  pointer-events: none;
  user-select: none;
}

/* 未登录用户不允许选中正文 */
body.is-guest .prompt-box,
body.is-guest .lib-card__prompt {
  user-select: none;
}

/* 打印与另存为时只留站点信息 */
@media print {
  .nav,
  .footer,
  .studio__rail,
  .lib-card__prompt,
  .prompt-box,
  .shot,
  .tag-pool {
    display: none !important;
  }
  body::before {
    content: "邦邦提示词 · 内容受版权保护，请勿打印或转载。";
    display: block;
    padding: 40px;
    font-size: 16px;
  }
}
/* build: 20260923055110 */
