@import url('anim-tools.css?v=60');

/* ============ prompt-hub 专属 ============ */

body[data-tool="prompt-hub"] {
  --step-color: #65625D;
  --step-color-d: #3D3B37;
  --step-color-bg: rgba(101,98,93,0.10);
  --step-color-soft: rgba(101,98,93,0.18);
  overflow: auto;
}

.ph-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Banner（顶部细条） ===== */
.ph-banner {
  background: var(--card-solid);
  border-bottom: 1px solid var(--line-warm);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.ph-banner-logo {
  height: 38px;
  width: auto;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ph-banner-logo:hover { opacity: 0.7; }
.ph-banner-actions { display: flex; gap: 10px; align-items: center; }
.ph-banner-btn {
  background: var(--text);
  color: var(--card-solid);
  border: 0;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.ph-banner-btn:hover { background: var(--brand-red); }
.ph-banner-logo[style*="default"]:hover { opacity: 1; }
.ph-banner-tag {
  background: var(--bg-soft);
  border: 1px solid var(--line-warm);
  color: var(--text-3);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 500;
}

/* ===== Hero（大标题区） ===== */
.ph-hero {
  background: linear-gradient(180deg, var(--card-solid) 0%, #FBF9F4 100%);
  padding: 56px 20px 36px;
  text-align: center;
  border-bottom: 1px solid var(--line-warm);
}
.ph-hero-title {
  font-size: 44px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1;
}
.ph-hero-sub {
  font-size: 14.5px;
  color: var(--text-3);
  margin: 0 0 30px;
  line-height: 1.55;
}

/* ===== Tabs 居中大尺寸 ===== */
.ph-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: var(--bg-soft);
  border-radius: 10px;
  border: 1px solid var(--line-warm);
}
.ph-tab {
  background: transparent;
  border: 0;
  padding: 10px 22px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--text-3);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}
.ph-tab:hover { color: var(--text); background: rgba(0,0,0,0.03); }
.ph-tab.ph-tab-active {
  background: var(--card-solid);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.ph-tab-count {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 400;
}
.ph-tab-active .ph-tab-count { color: var(--text-3); }

/* ===== Filter bar (类别 chips) ===== */
.ph-filter-bar {
  background: var(--card-solid);
  border-bottom: 1px solid var(--line-warm);
  padding: 14px 24px 12px;
  position: sticky;
  top: 64px;   /* 在 banner 之下 */
  z-index: 20;
}
.ph-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 1400px;
  margin: 0 auto;
}
.ph-chip {
  background: transparent;
  border: 1px solid var(--line-warm);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
}
.ph-chip:hover {
  border-color: var(--text-3);
  color: var(--text);
}
.ph-chip.ph-chip-active {
  background: var(--text);
  color: var(--card-solid);
  border-color: var(--text);
}
.ph-chip-count {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.6;
}

/* 语言筛选 chip：低对比第二行 */
.ph-filter-chips--lang { opacity: 0.85; }
.ph-chip-lang {
  font-size: 11.5px;
  padding: 4px 10px;
}

/* ===== Status bar ===== */
.ph-status-bar {
  background: var(--bg);
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-3);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  border-bottom: 1px solid var(--line-soft);
}
.ph-status-count strong { color: var(--text); font-weight: 600; }
.ph-status-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ph-sort-select {
  background: var(--card-solid);
  border: 1px solid var(--line-warm);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}
.ph-search-input {
  background: var(--card-solid);
  border: 1px solid var(--line-warm);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  width: 240px;
  color: var(--text);
}
.ph-search-input:focus {
  outline: none;
  border-color: var(--text-3);
}

/* ===== Main grid ===== */
.ph-main {
  flex: 1;
  padding: 18px 24px 48px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
.ph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* ===== Pager 翻页器 ===== */
.ph-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 28px auto 8px;
  flex-wrap: wrap;
}
.ph-pager-btn {
  background: var(--card-solid);
  border: 1px solid var(--line-warm);
  color: var(--text-2);
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  min-width: 34px;
  font-weight: 500;
  transition: all 0.15s;
}
.ph-pager-btn:hover:not(:disabled):not(.ph-pager-active):not(.ph-pager-ellipsis) {
  background: var(--bg-soft);
  border-color: var(--text-3);
  color: var(--text);
}
.ph-pager-btn.ph-pager-active {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: white;
  font-weight: 600;
  cursor: default;
}
.ph-pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ph-pager-btn.ph-pager-ellipsis {
  border: 0;
  background: transparent;
  cursor: default;
  color: var(--text-mute);
  padding: 6px 4px;
  min-width: 22px;
}

/* ===== Card ===== */
.ph-card {
  background: var(--card-solid);
  border: 1px solid var(--line-warm);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
}
.ph-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  border-color: var(--text-3);
}

.ph-card-media {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--bg-soft);
  overflow: hidden;
}
.ph-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ph-card-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.ph-card-media-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
  z-index: 2;
}
.ph-card-media-badge.ph-badge-video::before {
  content: '▶ ';
  font-size: 9px;
}

/* 语言角标（右上角小标） */
.ph-card-lang-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(196,52,45,0.85);
  color: white;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  z-index: 2;
}

/* media 图片淡出过渡（hover 时 iframe 覆盖） */
.ph-card-media-img {
  transition: opacity 0.2s;
}

.ph-card-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ph-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ph-card-desc {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
  flex: 1;
}
.ph-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-mute);
  margin-bottom: 10px;
}
.ph-card-cta {
  background: var(--text);
  color: var(--card-solid);
  border: 0;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  width: 100%;
  font-weight: 500;
  transition: background 0.15s;
}
.ph-card-cta:hover {
  background: var(--brand-red);
}

/* ==============================================================
 * 详情页 ph-cp-*（v14.6 即梦统一范式 - 取代 detail modal + create-page）
 *
 * 全屏覆盖灵感库瀑布流，含 view + composer 两态：
 *   - view 模式：图居中 + 右侧栏（作者/prompt/chip/CTA）
 *   - composer 模式：图缩小到上半 + 右栏 CTA 隐藏 + 底部 composer slide-up
 * ============================================================== */

.ph-create-page {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--card-solid);
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ph-create-page.ph-open {
  display: flex;
  opacity: 1;
}

/* × 关闭：右上角 floating */
.ph-cp-close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 0;
  font-size: 20px;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s;
}
.ph-cp-close:hover { background: var(--bg); color: var(--text); transform: rotate(90deg); }

/* 主体 grid：view 模式 left 3fr + right 1fr（右栏约 1/4），composer 模式加底部行 */
.ph-cp-body {
  flex: 1;
  display: grid;
  grid-template-columns: 3fr 1fr;
  min-height: 0;
  overflow: hidden;
  transition: grid-template-rows 0.3s ease;
}
.ph-cp-body.ph-cp-body-composer {
  grid-template-rows: minmax(0, 1fr) auto;
}

/* Stage：图居中 + 上下切换箭头 */
.ph-cp-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 40px;
  overflow: hidden;
  background: var(--card-solid);
  min-width: 0;
  min-height: 0;
}
.ph-cp-media {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: max-width 0.3s ease, max-height 0.3s ease;
}
.ph-cp-body-composer .ph-cp-media {
  /* composer 模式：媒体稍微缩小留位置 */
  max-height: 100%;
}
.ph-cp-media-video,
.ph-cp-media-img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  background: var(--bg-soft);
}
.ph-cp-body-composer .ph-cp-media-video,
.ph-cp-body-composer .ph-cp-media-img {
  max-height: calc(100vh - 320px);
}
.ph-cp-media-img { cursor: zoom-in; }
.ph-cp-media-empty {
  width: 360px;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border-radius: 10px;
  color: var(--text-mute);
  font-size: 14px;
}

/* 上下切换箭头：浮在 stage 右侧中部 */
.ph-cp-nav-arrows {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ph-cp-nav-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.ph-cp-nav-arrow:hover:not(:disabled) {
  background: var(--card-solid);
  border-color: var(--text-3);
  color: var(--text);
  transform: scale(1.06);
}
.ph-cp-nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* 右侧栏：作者 + chip + prompt + CTA */
.ph-cp-side {
  display: flex;
  flex-direction: column;
  padding: 24px 28px 24px;
  border-left: 1px solid var(--line-soft);
  background: var(--card-solid);
  overflow: hidden;
  min-width: 0;
}
.ph-cp-side-top {
  flex-shrink: 0;
  padding-right: 56px;  /* 给 close 按钮留位 */
  margin-bottom: 16px;
}
.ph-cp-author-row {
  margin-bottom: 6px;
}
.ph-cp-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ph-cp-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde6c8, #f5c97b);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ph-cp-author-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.ph-cp-date {
  font-size: 11.5px;
  color: var(--text-mute);
}

.ph-cp-side-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ph-cp-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.ph-cp-prompt {
  background: transparent;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 13px;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
  margin: 0 0 14px;
}
.ph-cp-side-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.ph-cp-chip {
  font-size: 11.5px;
  background: var(--bg-soft);
  border: 0;
  color: var(--text-2);
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 500;
}
.ph-cp-side-tool {
  background: transparent;
  border: 1px solid var(--line-warm);
  border-radius: 5px;
  font-size: 11.5px;
  color: var(--text-3);
  padding: 3px 9px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
}
.ph-cp-side-tool:hover { color: var(--text); border-color: var(--text-3); }

/* CTA 紧跟在 prompt + meta 下面（不粘底） */
.ph-cp-cta-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-shrink: 0;
}
.ph-cp-cta {
  flex: 1;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--line-warm);
  background: var(--card-solid);
  color: var(--text);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ph-cp-cta:hover {
  border-color: var(--text-3);
  background: var(--bg-soft);
}
.ph-cp-cta-primary {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: white;
}
.ph-cp-cta-primary:hover {
  background: var(--brand-red-hover);
  border-color: var(--brand-red-hover);
  color: white;
}

/* Composer 嵌入 slot：composer 模式下底部跨宽 */
.ph-cp-composer-slot {
  grid-column: 1 / -1;
  padding: 14px 60px 18px;
  background: var(--card-solid);
  border-top: 1px solid var(--line-soft);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: ph-cp-composer-slidein 0.32s ease;
}
@keyframes ph-cp-composer-slidein {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.ph-cp-composer-slot .ph-composer-text {
  min-height: 56px;
  max-height: 140px;
}

/* 响应式：窄屏单列 */
@media (max-width: 880px) {
  .ph-cp-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .ph-cp-side {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
    max-height: 40vh;
  }
  .ph-cp-stage { padding: 18px 22px; }
  .ph-cp-body-composer .ph-cp-media-img,
  .ph-cp-body-composer .ph-cp-media-video { max-height: calc(100vh - 380px); }
  .ph-cp-composer-slot { padding: 12px 16px 14px; }
}

/* ===== 一键复刻 modal ===== */
.ph-replicate-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
}
.ph-replicate-modal-backdrop.ph-open {
  opacity: 1;
  pointer-events: auto;
}
.ph-replicate-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(1080px, 94vw);
  height: min(720px, 90vh);
  background: var(--card-solid);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ph-replicate-modal.ph-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* ===== Head + stepper ===== */
.phr-head {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--line-warm);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.phr-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.phr-stepper {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--text-mute);
  flex-wrap: wrap;
}
.phr-step {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.phr-step-num {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text-mute);
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 600;
}
.phr-step-cur { color: var(--text); font-weight: 600; }
.phr-step-cur .phr-step-num { background: var(--brand-red); color: white; }
.phr-step-done { color: var(--text-3); }
.phr-step-done .phr-step-num { background: var(--ok); color: white; }
.phr-step-sep { color: var(--line-warm); }

/* ===== Body ===== */
.phr-body {
  padding: 22px 26px;
  overflow-y: auto;
  flex: 1;
}
.phr-step-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  height: 100%;
}
.phr-left, .phr-right { min-width: 0; display: flex; flex-direction: column; }
.phr-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.phr-prompt-box {
  background: #FFF2A8;
  padding: 14px 16px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
  overflow-y: auto;
  margin: 0;
  color: var(--text);
  min-height: 200px;
}
.phr-prompt-readonly { background: var(--bg-soft); }
.phr-prompt-edit {
  background: #FFF8D6;
  padding: 14px 16px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  flex: 1;
  border: 1px solid var(--line-warm);
  color: var(--text);
  resize: vertical;
  min-height: 240px;
  outline: none;
}
.phr-prompt-edit:focus { border-color: var(--brand-red); }
.phr-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 12px;
  flex-wrap: wrap;
}
.phr-meta a { color: var(--brand-red); text-decoration: none; }
.phr-meta a:hover { text-decoration: underline; }

/* ===== Step 2 角色映射 ===== */
.phr-char-block {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line-warm);
  border-radius: 10px;
  background: var(--card-solid);
}
.phr-char-orig, .phr-char-nsh {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.phr-char-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.phr-char-summary { font-size: 13.5px; font-weight: 600; color: var(--text); }
.phr-char-desc { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.phr-char-arrow {
  display: flex;
  align-items: center;
  color: var(--text-mute);
  font-size: 18px;
  font-weight: 300;
}
.phr-asset-picked {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  background: var(--bg-soft);
  border-radius: 6px;
  position: relative;
}
.phr-asset-picked img {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
}
.phr-asset-clear {
  position: absolute;
  right: 6px;
  top: 6px;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--line-warm);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  color: var(--text-3);
}
.phr-asset-clear:hover { color: var(--brand-red); }

/* ===== Step 4 执行方式 ===== */
.phr-exec-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.phr-exec-option {
  text-align: left;
  padding: 18px;
  background: var(--card-solid);
  border: 1px solid var(--line-warm);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: all 0.15s;
}
.phr-exec-option:hover { border-color: var(--text-3); }
.phr-exec-option.phr-exec-active {
  border: 2px solid var(--brand-red);
  background: var(--brand-red-soft);
  padding: 17px;   /* 抵消 border 增加 */
}
.phr-exec-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  flex-shrink: 0;
}
.phr-exec-active .phr-exec-icon { background: var(--brand-red); color: white; }
.phr-exec-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.phr-exec-desc { font-size: 12px; color: var(--text-3); line-height: 1.5; }

/* ===== 通用按钮 ===== */
.phr-btn-secondary, .phr-btn-primary {
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 0;
  transition: all 0.15s;
}
.phr-btn-secondary {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line-warm);
}
.phr-btn-secondary:hover { background: var(--bg); }
.phr-btn-primary {
  background: var(--brand-red);
  color: white;
}
.phr-btn-primary:hover:not([disabled]) { background: var(--brand-red-hover); }
.phr-btn-tiny {
  padding: 3px 9px;
  font-size: 11.5px;
  background: transparent;
  border: 1px solid var(--line-warm);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-3);
}
.phr-btn-tiny:hover { color: var(--text); border-color: var(--text-3); }
.phr-foot {
  padding: 14px 26px;
  border-top: 1px solid var(--line-warm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--bg);
}

/* ===== Loading state ===== */
.phr-loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-3);
  font-size: 14px;
}
.phr-loading::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-warm);
  border-top-color: var(--brand-red);
  border-radius: 50%;
  animation: ph-spin 0.8s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

/* 响应式：窄屏单列 */
@media (max-width: 760px) {
  .phr-step-grid { grid-template-columns: 1fr; }
  .phr-char-block { grid-template-columns: 1fr; }
  .phr-char-arrow { transform: rotate(90deg); justify-content: center; padding: 4px 0; }
  .phr-exec-options { grid-template-columns: 1fr; }
}

/* ===== Empty state ===== */
.ph-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mute);
  font-size: 13px;
}
.ph-empty-icon { font-size: 32px; margin-bottom: 10px; opacity: 0.4; }

/* ===== Loading spinner ===== */
.ph-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
  font-size: 13px;
}
.ph-loading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line-warm);
  border-top-color: var(--text-3);
  border-radius: 50%;
  animation: ph-spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes ph-spin {
  to { transform: rotate(360deg); }
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .ph-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
  .ph-filter-bar { padding: 12px 16px 10px; }
  .ph-main { padding: 14px 16px 32px; }
  .ph-search-input { width: 160px; }
  .ph-hero { padding: 40px 16px 28px; }
  .ph-hero-title { font-size: 32px; }
}
@media (max-width: 640px) {
  .ph-grid { grid-template-columns: 1fr 1fr; }
  .ph-tabs { flex-shrink: 0; }
  .ph-status-bar { flex-direction: column; gap: 8px; align-items: stretch; }
  .ph-search-input { width: 100%; }
  .ph-banner { padding: 0 14px; height: 54px; }
  .ph-banner-logo { height: 30px; }
  .ph-hero-title { font-size: 26px; }
  .ph-hero-sub { font-size: 12.5px; margin-bottom: 22px; }
  .ph-filter-bar { top: 54px; }
}

/* ==============================================================
 * Composer 嵌入式（v14 - 嵌入到 ph-cp-composer-slot 底部）
 * ============================================================== */

/* Composer 嵌入容器 */
.ph-composer-embedded {
  background: var(--card-solid);
  border: 1px solid var(--line-warm);
  border-radius: 14px;
  padding: 10px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Pill：嵌入模式下放在 composer-embedded 之上（slot 顶部） */
.ph-composer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  background: var(--card-solid);
  border: 1px solid var(--line-warm);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.15s;
  align-self: flex-start;   /* slot 内左对齐 */
}
.ph-composer-pill:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.ph-composer-pill-text { color: var(--text); }
.ph-composer-pill-link { color: var(--brand-red); font-weight: 600; }
.ph-composer-pill-running { background: linear-gradient(90deg, #fff8e7, var(--card-solid)); }
.ph-composer-pill-done { background: linear-gradient(90deg, #e9f8ee, var(--card-solid)); border-color: #74c986; }
.ph-composer-pill-done .ph-composer-pill-link { color: #2d8a44; }
.ph-composer-pill-failed { background: #fff5f3; border-color: #f0c0b8; }
.ph-composer-pill-failed .ph-composer-pill-link { color: #c0392b; }
.ph-composer-pill-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(196,52,45,0.2);
  border-top-color: var(--brand-red);
  border-radius: 50%;
  animation: ph-spin 0.7s linear infinite;
}

/* Dialog（主输入区） */
.ph-composer-dialog {
  position: relative;
  background: var(--card-solid);
  border-radius: 20px;
  border: 1px solid var(--line-warm);
  padding: 14px 16px 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ph-composer-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: 0;
  font-size: 18px;
  color: var(--text-mute);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}
.ph-composer-close:hover { color: var(--text); background: var(--bg-soft); }
.ph-composer-source {
  font-size: 11.5px;
  color: var(--text-mute);
  margin: -2px 36px 4px 4px;
}
.ph-composer-source strong { color: var(--text-2); font-weight: 600; }

/* 参考素材区 */
.ph-composer-refs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  min-height: 50px;
}
.ph-composer-refs-empty { min-height: 0; }
.ph-composer-ref {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line-warm);
  flex-shrink: 0;
}
.ph-composer-ref-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ph-composer-ref-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
}
.ph-composer-ref-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: 0;
  color: var(--text-3);
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ph-composer-ref:hover .ph-composer-ref-del { display: inline-flex; }
.ph-composer-ref-del:hover { color: var(--brand-red); }

.ph-composer-ref-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 52px;
  padding: 0 14px;
  background: var(--bg-soft);
  border: 1px dashed var(--line-warm);
  border-radius: 8px;
  color: var(--text-3);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.ph-composer-refs-empty .ph-composer-ref-add { padding: 0 16px; }
.ph-composer-ref-add:hover { border-color: var(--text-3); color: var(--text); }

/* Textarea */
.ph-composer-text-wrap {
  position: relative;
}
.ph-composer-text {
  width: 100%;
  min-height: 60px;
  max-height: 240px;
  resize: vertical;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  padding: 8px 0 6px;
  font-family: inherit;
}
.ph-composer-text::placeholder { color: var(--text-mute); }

/* AI 改写按钮：迁到工具栏（不再 absolute 在 textarea 上） */
.ph-composer-ai-btn {
  background: rgba(196, 52, 45, 0.08);
  color: var(--brand-red);
  border: 1px solid rgba(196, 52, 45, 0.25);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  white-space: nowrap;
}
.ph-composer-ai-btn:hover:not(:disabled) {
  background: rgba(196, 52, 45, 0.14);
  border-color: var(--brand-red);
}
.ph-composer-ai-btn:disabled { opacity: 0.6; cursor: wait; }

/* Toolbar：药丸按钮组 */
.ph-composer-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
  margin-top: 4px;
}
.ph-composer-pill-sel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line-warm);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
}
.ph-composer-pill-sel:hover { border-color: var(--text-3); color: var(--text); }
.ph-composer-pill-sel::after {
  content: '▾';
  font-size: 10px;
  color: var(--text-mute);
  margin-left: 2px;
}
.ph-composer-pill-sel select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.ph-composer-toolbar-spacer { flex: 1; }
.ph-composer-at-trigger {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line-warm);
  background: var(--card-solid);
  color: var(--text-3);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.15s;
}
.ph-composer-at-trigger:hover { color: var(--brand-red); border-color: var(--brand-red); }
.ph-composer-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-red);
  color: white;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.ph-composer-send:hover:not(:disabled) { background: var(--brand-red-hover); transform: translateY(-1px); }
.ph-composer-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* @ NSH 引用浮层 */
.ph-composer-at-panel {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--card-solid);
  border: 1px solid var(--line-warm);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.12);
  padding: 14px 16px 16px;
  max-height: 60vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.ph-composer-at-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 10px;
}
.ph-composer-at-close {
  background: transparent;
  border: 0;
  font-size: 16px;
  color: var(--text-mute);
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}
.ph-composer-at-close:hover { color: var(--text); }
.ph-composer-at-tools {
  margin-bottom: 12px;
}
.ph-composer-at-search {
  width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--line-warm);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-soft);
  outline: none;
  margin-bottom: 8px;
}
.ph-composer-at-search:focus { border-color: var(--brand-red); background: var(--card-solid); }
.ph-composer-at-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.ph-composer-at-chip {
  font-size: 11.5px;
  background: transparent;
  border: 1px solid var(--line-warm);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
}
.ph-composer-at-chip:hover { color: var(--text); border-color: var(--text-3); }
.ph-composer-at-chip-active {
  background: var(--text);
  color: var(--card-solid);
  border-color: var(--text);
}
.ph-composer-at-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}
.ph-composer-at-item {
  background: var(--bg-soft);
  border: 1px solid var(--line-warm);
  border-radius: 8px;
  padding: 5px;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ph-composer-at-item:hover {
  border-color: var(--brand-red);
  background: rgba(196,52,45,0.05);
  transform: translateY(-1px);
}
.ph-composer-at-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  object-fit: cover;
  background: #fff;
}
.ph-composer-at-item span {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.ph-composer-at-empty {
  grid-column: 1/-1;
  text-align: center;
  color: var(--text-mute);
  font-size: 12px;
  padding: 28px 0;
}

@media (max-width: 760px) {
  .ph-composer { bottom: 10px; width: 96vw; }
  .ph-composer-dialog { padding: 10px 12px 10px; }
}

/* ==============================================================
 * 「去查看」任务抽屉（v14 placeholder）
 * ============================================================== */
.ph-tasks-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20,18,14,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 95;
}
.ph-tasks-drawer-backdrop.ph-open {
  opacity: 1;
  pointer-events: auto;
}
.ph-tasks-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(480px, 92vw);
  background: var(--card-solid);
  box-shadow: -8px 0 24px rgba(0,0,0,0.12);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}
.ph-tasks-drawer.ph-open { transform: translateX(0); }
.ph-tasks-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-warm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ph-tasks-title { font-size: 15px; font-weight: 600; color: var(--text); }
.ph-tasks-body { flex: 1; overflow-y: auto; padding: 14px 18px 22px; }
.ph-tasks-empty {
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
  padding: 50px 20px;
}
.ph-tasks-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line-warm);
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--card-solid);
}
.ph-tasks-item-thumb {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-soft);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph-tasks-item-thumb img,
.ph-tasks-item-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ph-tasks-item-thumb-placeholder {
  font-size: 24px;
  color: var(--text-mute);
}
.ph-tasks-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ph-tasks-item-prompt {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ph-tasks-item-meta {
  font-size: 11px;
  color: var(--text-mute);
  display: flex;
  gap: 8px;
  align-items: center;
}
.ph-tasks-item-status-running { color: var(--brand-red); font-weight: 600; }
.ph-tasks-item-status-done { color: #2d8a44; font-weight: 600; }
.ph-tasks-item-status-failed { color: #c0392b; font-weight: 600; }
.ph-tasks-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}
.ph-tasks-item-actions button {
  background: transparent;
  border: 1px solid var(--line-warm);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-3);
  padding: 2px 8px;
  cursor: pointer;
}
.ph-tasks-item-actions button:hover { color: var(--text); border-color: var(--text-3); }

/* ==============================================================
 * Step 4 「准备就绪」摘要卡（v13 起 — 不再内联生成，跳"自由创作"）
 * ============================================================== */
.phr-handoff {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.phr-handoff-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--brand-red-soft, rgba(196, 52, 45, 0.07));
  border: 1px solid var(--brand-red, #c4342d);
  border-radius: 10px;
}
.phr-handoff-banner-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.phr-handoff-banner-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.phr-handoff-banner-sub {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.55;
}
.phr-handoff-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}
.phr-handoff-prompt {
  background: var(--bg-soft);
  border: 1px solid var(--line-warm);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'JetBrains Mono', Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-2);
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.phr-handoff-refs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.phr-handoff-ref {
  width: 80px;
  background: var(--bg-soft);
  border: 1px solid var(--line-warm);
  border-radius: 6px;
  padding: 4px;
  text-align: center;
}
.phr-handoff-ref img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  background: #fff;
}
.phr-handoff-ref-name {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phr-handoff-ref-more {
  align-self: center;
  font-size: 13px;
  color: var(--text-mute);
  background: var(--bg-soft);
  padding: 6px 12px;
  border-radius: 6px;
}
.phr-handoff-empty {
  font-size: 12px;
  color: var(--text-mute);
  background: var(--bg-soft);
  border: 1px dashed var(--line-warm);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}
.phr-handoff-config {
  border-top: 1px dashed var(--line-warm);
  padding-top: 14px;
}
.phr-handoff-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.phr-handoff-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-solid);
  border: 1px solid var(--line-warm);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-2);
}
.phr-handoff-pill select {
  border: 0;
  background: transparent;
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  padding: 0 2px;
  outline: none;
}
.phr-handoff-hint {
  font-size: 11.5px;
  color: var(--text-mute);
  line-height: 1.5;
}

@media (max-width: 880px) {
  .phr-handoff-grid { grid-template-columns: 1fr; }
}

/* ==============================================================
 * Step 4 内联生成 UI（v12 旧 - 保留 css 以便回滚，已不再渲染）
 * ============================================================== */
.phr-gen-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  align-items: start;
}
.phr-gen-left, .phr-gen-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.phr-ref-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.phr-ref-card {
  width: 100px;
  background: var(--bg-soft);
  border: 1px solid var(--line-warm);
  border-radius: 6px;
  padding: 4px;
  text-align: center;
}
.phr-ref-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  background: #fff;
}
.phr-ref-card-name {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phr-gen-params {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.phr-gen-params label {
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
}
.phr-gen-params select {
  padding: 5px 9px;
  border: 1px solid var(--line-warm);
  border-radius: 4px;
  background: #fff;
  font-size: 12.5px;
  cursor: pointer;
}
.phr-gen-params select:disabled {
  background: var(--bg-soft);
  cursor: not-allowed;
  opacity: 0.6;
}
.phr-gen-start {
  width: 100%;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.phr-gen-status {
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--bg-soft);
  border: 1px solid var(--line-warm);
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 6px;
}
.phr-gen-progressbar {
  height: 4px;
  background: var(--bg-soft);
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
  border: 1px solid var(--line-warm);
}
.phr-gen-progressbar-fill {
  height: 100%;
  background: var(--brand-red);
  transition: width 0.4s ease;
}
.phr-gen-error {
  font-size: 12.5px;
  color: #c0392b;
  background: #fff5f3;
  border: 1px solid #f0c0b8;
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 6px;
}

@media (max-width: 880px) {
  .phr-gen-grid { grid-template-columns: 1fr; }
}
