/*
Theme Name: 设计666
Theme URI: https://sheji666.com
Author: 设计666
Description: 设计666 短视频模版站主题。四个前台板块各由一个文章分类驱动：短视频模版、封面模版、其他工具分享、视频变现方法；支持前台投稿审核与旧内容迁移。
Version: 2.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sheji666
Tags: one-column, custom-menu, editor-style
*/

/* =========================================================
   设计666 — 设计系统
   简洁现代：白底、细线、克制配色、大留白
   ========================================================= */

:root {
  /* 色板 */
  --bg: #ffffff;
  --bg-soft: #f7f7f9;
  --bg-tint: #f2f3ff;
  --ink: #0c0c10;
  --ink-2: #55555f;
  --ink-3: #8c8c98;
  --line: #e9e9ee;
  --line-strong: #dcdce4;
  --accent: #5257e5;
  --accent-dark: #3f43c9;
  --accent-soft: #eef0ff;
  --green: #10a37f;
  --amber: #b07d00;

  /* 排版 */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* 尺寸 */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(12, 12, 16, 0.04);
  --shadow: 0 8px 24px -12px rgba(12, 12, 16, 0.16);
  --shadow-lg: 0 24px 60px -28px rgba(12, 12, 16, 0.28);
  --header-h: 64px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

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

h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 24px;
}

.container--narrow { max-width: 860px; }

.section { padding-block: 88px; }
.section--tight { padding-block: 56px; }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
/* 紧跟首屏的板块：收紧上间距，避免与首屏底部留白叠加 */
.section--after-hero { padding-top: 24px; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.h1 {
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 640;
}

.h2 {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 620;
}

.h3 {
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.lead {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.7;
  color: var(--ink-2);
}

.muted { color: var(--ink-3); }
.small { font-size: 13px; }

.text-gradient {
  background: linear-gradient(96deg, #5257e5 0%, #8b5cf6 52%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(12, 12, 16, 0.02);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 640;
  letter-spacing: -0.02em;
  font-size: 16px;
  flex-shrink: 0;
}

.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(140deg, #5257e5, #8b5cf6 60%, #06b6d4);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px -4px rgba(82, 87, 229, 0.6);
}

.brand__sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  border-left: 1px solid var(--line-strong);
  padding-left: 10px;
  margin-left: 2px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav__link {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.nav__link:hover { color: var(--ink); background: var(--bg-soft); }

.nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; }

.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.nav__cta { margin-left: 12px; }

.nav__toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}

.nav__toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}

.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
}
.nav__toggle span::before { top: -5px; }
.nav__toggle span::after { top: 5px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 560;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.16s var(--ease), background-color 0.18s var(--ease),
    border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), color 0.18s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 18px -10px rgba(12, 12, 16, 0.7);
}

.btn--primary:hover { background: #22222b; }

.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px -12px rgba(82, 87, 229, 0.9);
}

.btn--accent:hover { background: var(--accent-dark); }

.btn--ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover { border-color: var(--ink-3); background: var(--bg-soft); }

.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 9px; }

.btn__arrow { transition: transform 0.2s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 96px 40px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% 0 auto 0;
  height: 620px;
  background:
    radial-gradient(46% 60% at 22% 26%, rgba(82, 87, 229, 0.13), transparent 70%),
    radial-gradient(40% 55% at 78% 12%, rgba(139, 92, 246, 0.12), transparent 70%),
    radial-gradient(38% 50% at 60% 70%, rgba(6, 182, 212, 0.09), transparent 72%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: 780px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 26px;
}

.hero__badge b {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero__title { margin-bottom: 20px; }

.hero .lead { max-width: 620px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.stat__num {
  font-size: 26px;
  font-weight: 620;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

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

/* ---------- Cards / Grid ---------- */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    border-color 0.22s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(12, 12, 16, 0.28));
  opacity: 0.9;
}

.card__play {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.5);
  transition: transform 0.22s var(--ease);
}

.card:hover .card__play { transform: scale(1.08); }

.card__duration {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(12, 12, 16, 0.62);
  color: rgba(255, 255, 255, 0.95);
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 20px;
  flex: 1;
}

.card__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.card__desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}

/* ---------- Chips / Tags ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.tag--accent { background: var(--accent-soft); border-color: #dfe2ff; color: var(--accent-dark); }
.tag--green { background: #eaf7f2; border-color: #d3ede4; color: #0b7d61; }
.tag--amber { background: #fdf5e5; border-color: #f2e4c4; color: #8a6300; }

/* ---------- Filter bar ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

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

.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  transition: all 0.16s var(--ease);
}

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

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.search {
  position: relative;
  margin-left: auto;
  min-width: 240px;
  flex: 0 1 280px;
}

.search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 13.5px;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.search input::placeholder { color: var(--ink-3); }

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(82, 87, 229, 0.12);
}

.search__icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}

.result-count { font-size: 13px; color: var(--ink-3); }

.empty {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-3);
  font-size: 14px;
}

/* ---------- Feature / workflow ---------- */
.steps {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.step {
  padding: 30px 26px;
  border-right: 1px solid var(--line);
  position: relative;
}

.step:last-child { border-right: 0; }

.step__num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.step h3 { margin-bottom: 8px; }
.step p { font-size: 13.5px; color: var(--ink-2); }

/* ---------- Page header ---------- */
.page-head {
  padding-block: 64px 40px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 100% at 12% 0%, rgba(82, 87, 229, 0.08), transparent 70%);
}

.page-head .lead { max-width: 620px; margin-top: 14px; }

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 18px;
}

.crumbs a:hover { color: var(--ink); }

/* ---------- Share wall ---------- */
.share-item {
  display: block;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.share-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.share-item__cover {
  aspect-ratio: 4 / 5;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.share-item__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(12, 12, 16, 0.42));
}

.share-item__quote {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 14px;
  font-weight: 520;
  line-height: 1.45;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

.share-item__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
}

.share-item__user { display: flex; align-items: center; gap: 9px; min-width: 0; }

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 640;
  color: #fff;
  flex-shrink: 0;
}

.share-item__name { font-size: 13px; font-weight: 560; }

.like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 4px 8px;
  border-radius: 7px;
  transition: all 0.16s var(--ease);
}

.like:hover { background: var(--bg-soft); color: var(--ink-2); }
.like[data-liked="true"] { color: #e0245e; }

/* ---------- Form ---------- */
.form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 560;
  margin-bottom: 7px;
}

.field .hint { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-left: 6px; }

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 14px;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

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

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(82, 87, 229, 0.12);
}

.field-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 56px;
  background: #0c0c10;
  color: #fff;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82, 87, 229, 0.55), transparent 62%);
  pointer-events: none;
}

.cta-band__inner { position: relative; max-width: 560px; }
.cta-band .h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.68); margin-top: 12px; }
.cta-band .btn--primary { background: #fff; color: var(--ink); }
.cta-band .btn--primary:hover { background: #eeeef2; }
.cta-band .btn--ghost { background: transparent; border-color: rgba(255, 255, 255, 0.24); color: #fff; }
.cta-band .btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.4); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 52px 36px;
  background: var(--bg-soft);
}

.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1.6fr repeat(3, 1fr);
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.footer-col li + li { margin-top: 9px; }

.footer-col a { font-size: 13.5px; color: var(--ink-2); transition: color 0.16s var(--ease); }
.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: 24px;
  align-items: center;
  justify-content: center;
}

.modal.is-open { display: flex; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 16, 0.42);
  backdrop-filter: blur(3px);
}

.modal__panel {
  position: relative;
  width: min(680px, 100%);
  max-height: min(84vh, 780px);
  overflow: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.24s var(--ease);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.modal__close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  flex-shrink: 0;
}

.modal__close:hover { background: var(--bg-soft); color: var(--ink); }

.modal__body { padding: 22px 26px 28px; }

.prompt-box {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: 16px 16px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: #2b2b34;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 16px);
  z-index: 200;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
/* 只有 JS 正常执行时才隐藏内容，避免脚本失效导致整页空白 */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

html.js-reveal .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html.js-reveal .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .share-layout { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cta-band { padding: 40px 28px; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
}

@media (max-width: 760px) {
  :root { --header-h: 58px; }
  .section { padding-block: 60px; }
  .section--after-hero { padding-top: 18px; }
  .hero { padding-block: 56px 34px; }
  .nav__links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__link { padding: 11px 10px; }
  .nav__link[aria-current="page"]::after { display: none; }
  .nav__cta { margin-left: 0; margin-top: 8px; }
  .nav__toggle { display: flex; }
  .brand__sub { display: none; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .search { margin-left: 0; width: 100%; flex-basis: 100%; }
  .field-row { grid-template-columns: 1fr; }
  .form-card { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .page-head { padding-block: 40px 28px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal__panel { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 88vh; }
}

/* =========================================================
   链路交互层：可点击卡片 / 收藏 / 详情页 / 状态反馈
   ========================================================= */

/* 卡片整卡点击热区（叠在内容之上，按钮再抬一层） */
.card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}

.card__link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.card__foot .btn { position: relative; z-index: 2; }


/* 工具图标 */
.tool-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 640;
  font-size: 15px;
  flex-shrink: 0;
  background: linear-gradient(140deg, #5257e5, #8b5cf6 65%, #06b6d4);
}

.tool-mark--sm { width: 26px; height: 26px; border-radius: 8px; font-size: 11.5px; }

/* 复制成功的按钮态 */
.btn.is-done {
  background: #eaf7f2 !important;
  border-color: #d3ede4 !important;
  color: #0b7d61 !important;
}

.quick-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }

/* 空状态附加操作 */
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

/* 分享卡操作区 */
.share-item__actions { display: flex; align-items: center; gap: 6px; }

.share-del {
  font-size: 12px;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px 8px;
  transition: all 0.16s var(--ease);
}

.share-del:hover { color: #a32d2d; border-color: #f7c1c1; background: #fcebeb; }

.form-error {
  display: block;
  margin-top: 10px;
  font-size: 12.5px;
  color: #a32d2d;
}

/* =========================================================
   模版详情页
   ========================================================= */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 44px;
  align-items: start;
}

.detail-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(12, 12, 16, 0.26));
}

.play-lg {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.5);
}

.detail-title {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 620;
  margin: 0;
}

.block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 40px 0 14px;
}

.block-title h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.prompt-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.prompt-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.7;
}

.prompt-row:first-child { border-top: 0; }

.prompt-key {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--accent-dark);
  padding-top: 3px;
  word-break: break-all;
}

.prompt-val { color: #2b2b34; }

.tips { display: grid; gap: 10px; }

.tips li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

.tips li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.side-card h3 {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}

/* 详情页右侧：扫码领取提示词 */
.side-card--qr { text-align: center; }

.side-card--qr h3 {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
}

.qr-box {
  max-width: 300px;
  margin-inline: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.qr-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.meta-list { display: grid; gap: 10px; font-size: 13.5px; }
.meta-list > div { display: flex; justify-content: space-between; gap: 12px; }
.meta-list dt { color: var(--ink-3); }
.meta-list dd { margin: 0; font-weight: 520; text-align: right; }

.tool-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.tool-chip:hover { background: var(--bg-soft); border-color: var(--line-strong); }
.tool-chip__name { font-size: 13.5px; font-weight: 520; }

.side-actions { display: grid; gap: 8px; margin-top: 16px; }
.side-actions .btn { width: 100%; }

@media (max-width: 960px) {
  .detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .side-card { position: static; }
}

@media (max-width: 760px) {
  .prompt-row { grid-template-columns: 1fr; gap: 4px; }
  .prompt-key { padding-top: 0; }
}


/* 首屏长文案的断行控制：桌面在语义处换行，窄屏自然流 */
.br-lg { display: none; }

@media (min-width: 761px) {
  .br-lg { display: inline; }
}

/* =========================================================
   首屏右侧：模版叠卡视觉（纯 HTML/CSS，无图片依赖）
   ========================================================= */
.hero__inner {
  position: relative;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.78fr);
  gap: 44px;
  align-items: center;
}

.hero__copy { min-width: 0; }
.hero__visual { min-width: 0; }

/* 分栏后标题字号降一档，避免中文长句在窄栏里挤成三行 */
.hero__title { font-size: clamp(30px, 3.9vw, 50px); }

.stack {
  position: relative;
  height: 376px;
}

.stack__card {
  position: absolute;
  display: block;
  color: inherit;
  text-decoration: none;
  width: clamp(142px, 13.6vw, 178px);
  padding: 8px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 26px 50px -30px rgba(16, 16, 24, 0.45), 0 3px 8px rgba(16, 16, 24, 0.05);
  transition: transform 0.34s var(--ease), box-shadow 0.34s var(--ease);
}

.stack__card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.stack__card--a { top: 46px; left: 0; z-index: 1; transform: rotate(-7deg); }
.stack__card--b { top: 0; right: 4px; z-index: 2; transform: rotate(6deg); }
.stack__card--c { top: 108px; left: 50%; z-index: 3; transform: translateX(-50%) rotate(-1.5deg); }

/* 悬停时三张卡轻微散开，暗示「还有很多张」 */
.stack:hover .stack__card--a { transform: rotate(-10deg) translate(-5px, -5px); }
.stack:hover .stack__card--b { transform: rotate(9deg) translate(5px, -7px); }
.stack:hover .stack__card--c {
  transform: translateX(-50%) translateY(-7px) rotate(0deg);
  box-shadow: 0 34px 60px -32px rgba(16, 16, 24, 0.55), 0 3px 8px rgba(16, 16, 24, 0.05);
}

.stack__cover {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #e8edf4;
  line-height: 0; /* 去掉 img 底部行内基线空隙 */
}

/* 图按卡片宽度铺满，高度随原图比例自适应：不裁切、不缩小、不变形 */
.stack__cover-img {
  display: block;
  width: 100%;
  height: auto;
}

.stack__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(10, 10, 14, 0.16) 100%);
  pointer-events: none;
}

.stack__play {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.93);
  color: #1a1a22;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
}

.stack__time {
  position: absolute;
  z-index: 1;
  right: 7px;
  bottom: 7px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(12, 12, 16, 0.62);
  color: #fff;
  font-size: 10.5px;
  font-weight: 560;
  letter-spacing: 0.02em;
}

.stack__body { padding: 9px 4px 4px; }

.stack__title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stack__meta { margin-top: 3px; font-size: 11px; color: var(--ink-3); }

.stack__badge {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px -18px rgba(16, 16, 24, 0.5);
  font-size: 12px;
  font-weight: 560;
  color: var(--ink-2);
  white-space: nowrap;
}

.stack__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(140deg, #5257e5, #8b5cf6);
}

@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 30px; }
  .hero__visual { width: 100%; max-width: 440px; margin-inline: auto; }
  .stack { height: 340px; }
}

@media (max-width: 760px) {
  .stack { height: 320px; }
  .stack__card { width: 152px; }
  .stack__card--a { top: 40px; }
  .stack__card--b { top: 0; }
  .stack__card--c { top: 66px; }
}

/* 模版区底部「查看更多」 */
.section-more {
  display: grid;
  place-items: center;
  margin-top: 36px;
}

.section-more .btn { justify-self: center; }

/* 首页模版：桌面 3 行（9 张）；窄屏一列 3 张，避免首页过长 */
@media (max-width: 760px) {
  #home-templates .card:nth-child(n + 4) { display: none; }
}

/* 首页封面墙：纯图 + 标题（无作者与点赞） */
.share-item--cover .share-item__cover { aspect-ratio: 3 / 4; padding: 16px; }

.share-item--cover .share-item__quote {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================================
   WordPress 适配层
   ========================================================= */

/* 顶部管理工具条：避免遮挡 sticky 头部 */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* 后台菜单输出的 li 不参与布局，让链接直接成为 flex 子项 */
.nav__links > li { display: contents; }

/* 无障碍隐藏文本 */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 普通页面正文 */
.entry {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 72px;
}
.entry__head { margin-bottom: 24px; }
.entry-content { font-size: 16px; color: var(--ink-2); }
.entry-content > * + * { margin-top: 18px; }
.entry-content h2 { font-size: 24px; color: var(--ink); letter-spacing: -0.01em; margin-top: 36px; }
.entry-content h3 { font-size: 19px; color: var(--ink); margin-top: 28px; }
.entry-content ul, .entry-content ol { padding-left: 1.25em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li + li { margin-top: 6px; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { max-width: 100%; height: auto; border-radius: var(--radius); }
.entry-content blockquote {
  padding: 14px 18px;
  border-left: 3px solid var(--line-strong);
  background: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.entry-content code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 5px;
}

/* 表单按钮与 WP 默认样式冲突时保持主题风格 */
button, input, select, textarea { font: inherit; }

/* 模版详情：正文即提示词，按文章排版但加点内边距 */
#d-prompt .entry-content {
  padding: 20px 22px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-2);
}

#d-prompt .entry-content p { margin: 0; }
#d-prompt .entry-content > * + * { margin-top: 12px; }

/* 板块为空时的占位 */
.board-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
}

/* =========================================================
   模版详情：扫码领取提示词
   桌面端吸附在右侧，窄屏改为底部浮动按钮 + 扫码浮层
   ========================================================= */

/* 桌面端：让右侧栏本身吸附（网格项的吸附范围是整个行高，比卡片自身吸附更稳） */
@media (min-width: 961px) {
  .detail-grid > aside {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    align-self: start;
  }

  .detail-grid .side-card {
    position: static;
    top: auto;
  }
}

/* 底部浮动按钮：默认不显示，只在窄屏出现 */
.qr-fab { display: none; }

@media (max-width: 960px) {
  /* 窄屏不再展示右侧卡片，改为底部按钮 */
  .detail-grid > aside { display: none; }

  /* 给固定按钮留出空间，避免压住页脚 */
  body[data-page="detail"] { padding-bottom: 92px; }

  .qr-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    max-width: 420px;
    margin-inline: auto;
    height: 50px;
    z-index: 60;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    box-shadow: 0 12px 28px -12px rgba(12, 12, 16, 0.55);
    cursor: pointer;
    transition: transform 0.16s var(--ease);
  }

  .qr-fab:active { transform: translateY(1px); }
}

/* 扫码浮层 */
.qr-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.qr-sheet.is-open { display: flex; }

.qr-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 14, 0.72);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.qr-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 26px 22px calc(30px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px 20px 0 0;
  background: #fff;
  text-align: center;
  animation: qr-sheet-in 0.26s var(--ease);
}

.qr-sheet__panel:focus { outline: none; }

@keyframes qr-sheet-in {
  from { transform: translateY(26px); opacity: 0.5; }
  to { transform: none; opacity: 1; }
}

.qr-sheet__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.qr-sheet .qr-box { margin-top: 16px; }

.qr-sheet__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.qr-sheet__close:hover { background: var(--bg-soft); color: var(--ink); }

body.qr-locked { overflow: hidden; }
