/* ============ 海报工场 PosterForge 全局样式 ============ */
:root {
  --ink: #0b1220;
  --ink-2: #1f2937;
  --text: #111827;
  --text-2: #4b5563;
  --text-3: #8b95a5;
  --line: #e6e9ef;
  --line-2: #eef1f6;
  --bg: #f7f8fa;
  --card: #ffffff;
  --accent: #ff5c35;
  --accent-d: #e64520;
  --accent-l: #fff1ec;
  --blue: #2563eb;
  --green: #0f9d58;
  --radius: 14px;
  --radius-s: 9px;
  --shadow-s: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-m: 0 8px 24px rgba(16, 24, 40, .09);
  --shadow-l: 0 24px 60px rgba(16, 24, 40, .16);
  --font: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d3d8e0; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b9c0cb; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-s);
  background: #fff; border: 1px solid var(--line); color: var(--text);
  font-weight: 500; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #cfd5df; background: #fafbfc; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #1c2739; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-d); border-color: var(--accent-d); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: #f1f3f7; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.danger { color: #dc2626; }

.chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border-radius: 20px; background: #fff; border: 1px solid var(--line);
  color: var(--text-2); font-size: 13px; cursor: pointer; transition: .15s; white-space: nowrap;
}
.chip:hover { border-color: #cfd5df; color: var(--text); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.input, .select {
  height: 36px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; outline: none; transition: .15s; width: 100%;
}
.input:focus, .select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11, 18, 32, .07); }
textarea.input { height: auto; padding: 9px 11px; resize: vertical; min-height: 76px; line-height: 1.6; }
.input.sm { height: 30px; font-size: 12px; padding: 0 8px; }

.toast-wrap { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(15, 23, 42, .93); color: #fff; padding: 9px 18px; border-radius: 10px;
  font-size: 13px; box-shadow: var(--shadow-m); animation: toastIn .2s ease; max-width: 76vw;
}
.toast.ok { background: #0f766e; }
.toast.err { background: #b42318; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .42); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 9000; padding: 20px;
}
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 420px; padding: 26px;
  box-shadow: var(--shadow-l); animation: modalIn .18s ease; max-height: 92vh; overflow: auto;
}
.modal.wide { max-width: 860px; }
@keyframes modalIn { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; transform: none; } }
.modal h3 { margin: 0 0 4px; font-size: 20px; }
.modal .sub { color: var(--text-3); font-size: 13px; margin-bottom: 18px; }
.hidden { display: none !important; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100; height: 64px; background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: 1240px; margin: 0 auto; height: 100%; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: .2px; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
  box-shadow: 0 2px 8px rgba(11, 18, 32, .22);
}
.logo-mark b { color: var(--accent); }
.nav-links { display: flex; gap: 22px; font-size: 14px; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none;
}

/* ---------- 首页 ---------- */
.hero { max-width: 1240px; margin: 0 auto; padding: 66px 24px 30px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 52px; line-height: 1.14; letter-spacing: -1px; margin: 0 0 18px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); position: relative; }
.hero p.lead { font-size: 17px; color: var(--text-2); line-height: 1.75; margin: 0 0 28px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-stats { display: flex; gap: 30px; margin-top: 34px; }
.hero-stats div b { display: block; font-size: 22px; }
.hero-stats div span { font-size: 12px; color: var(--text-3); }
.hero-visual { position: relative; height: 430px; }
.poster-card {
  position: absolute; border-radius: 14px; box-shadow: var(--shadow-l); overflow: hidden;
  background: #fff; transition: transform .35s ease;
}
.poster-card canvas { display: block; width: 100%; height: auto; }
.poster-card.p1 { width: 236px; left: 10%; top: 40px; transform: rotate(-6deg); z-index: 3; }
.poster-card.p2 { width: 208px; right: 2%; top: 6px; transform: rotate(5deg); z-index: 2; }
.poster-card.p3 { width: 200px; left: 40%; top: 150px; transform: rotate(-2deg); z-index: 4; }
.hero-visual:hover .p1 { transform: rotate(-8deg) translateY(-6px); }
.hero-visual:hover .p2 { transform: rotate(7deg) translateY(-8px); }
.hero-visual:hover .p3 { transform: rotate(-4deg) translateY(6px); }

.section { max-width: 1240px; margin: 0 auto; padding: 46px 24px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { font-size: 28px; margin: 0; letter-spacing: -.4px; }
.section-head p { margin: 6px 0 0; color: var(--text-3); font-size: 14px; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  transition: .2s;
}
.feature:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); border-color: transparent; }
.feature .ico {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-l); color: var(--accent); font-size: 18px; margin-bottom: 12px;
}
.feature h4 { margin: 0 0 6px; font-size: 15px; }
.feature p { margin: 0; color: var(--text-3); font-size: 13px; line-height: 1.65; }

.tpl-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: start; }
.tpl-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  cursor: pointer; transition: .18s; position: relative;
}
.tpl-card:hover { box-shadow: var(--shadow-m); transform: translateY(-3px); border-color: transparent; }
.tpl-thumb { position: relative; width: 100%; background: #f1f3f7; overflow: hidden; }
.tpl-thumb .inner { position: absolute; inset: 0; }
.tpl-thumb canvas { width: 100% !important; height: 100% !important; display: block; }
.tpl-meta { padding: 9px 11px 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tpl-meta .name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-meta .cat { font-size: 11px; color: var(--text-3); flex: none; }
.tpl-fav {
  position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); display: grid; place-items: center; font-size: 14px;
  color: #9aa3b2; opacity: 0; transition: .15s; z-index: 2;
}
.tpl-card:hover .tpl-fav { opacity: 1; }
.tpl-fav.on { opacity: 1; color: #ef4444; }
.tpl-fav:hover { transform: scale(1.08); }

.cta-band {
  max-width: 1240px; margin: 20px auto 60px; padding: 48px 40px; border-radius: 22px;
  background: linear-gradient(120deg, #0b1220, #1c2739 55%, #2b1a14);
  color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 8px; font-size: 30px; }
.cta-band p { margin: 0; color: #c8d0dd; }

.footer { border-top: 1px solid var(--line); padding: 28px 24px; text-align: center; color: var(--text-3); font-size: 13px; }
.footer a:hover { color: var(--text); }

/* ---------- 作品页 ---------- */
.page-wrap { max-width: 1240px; margin: 0 auto; padding: 32px 24px 70px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; margin: 0; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.works-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: start; }
.work-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: .18s; }
.work-card:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); }
.work-thumb { position: relative; background: #f1f3f7; aspect-ratio: 4/3; overflow: hidden; cursor: pointer; }
.work-thumb img { width: 100%; height: 100%; object-fit: contain; }
.work-thumb .ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; font-size: 11px; letter-spacing: .5px; }
.work-thumb .ph b { font-size: 26px; font-weight: 800; letter-spacing: 2px; }
.work-thumb .ph span { opacity: .75; }
.work-ops { position: absolute; inset: auto 0 0 0; padding: 8px; display: flex; gap: 6px; justify-content: flex-end;
  background: linear-gradient(transparent, rgba(15, 23, 42, .45)); opacity: 0; transition: .15s; }
.work-card:hover .work-ops { opacity: 1; }
.work-ops button {
  height: 28px; padding: 0 10px; border-radius: 7px; background: rgba(255, 255, 255, .95);
  font-size: 12px; color: var(--text);
}
.work-meta { padding: 11px 13px; }
.work-meta .t { font-size: 14px; font-weight: 500; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-meta .s { font-size: 12px; color: var(--text-3); display: flex; justify-content: space-between; }
.empty { text-align: center; padding: 80px 20px; color: var(--text-3); }
.empty .big { font-size: 40px; margin-bottom: 10px; opacity: .5; }
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 30px; }
.pager button { min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.pager button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager button:disabled { opacity: .4; }

/* ---------- 登录 ---------- */
.auth-tabs { display: flex; gap: 6px; background: #f1f3f7; padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.auth-tabs button { flex: 1; height: 34px; border-radius: 8px; font-size: 13px; color: var(--text-2); }
.auth-tabs button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: var(--shadow-s); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form .field label { font-size: 12px; }
.auth-foot { margin-top: 14px; font-size: 12px; color: var(--text-3); text-align: center; }
.auth-foot a { color: var(--blue); cursor: pointer; }

/* ================= 编辑器 ================= */
body.editor { overflow: hidden; background: #eef1f6; }
.ed-top {
  height: 56px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 14px; position: relative; z-index: 60;
}
.ed-top .sep { width: 1px; height: 22px; background: var(--line); flex: none; }
.ed-name {
  border: 1px solid transparent; background: transparent; height: 32px; padding: 0 8px;
  border-radius: 7px; font-weight: 600; font-size: 14px; min-width: 120px; max-width: 240px;
}
.ed-name:hover { border-color: var(--line); }
.ed-name:focus { outline: none; border-color: var(--ink); background: #fff; }
.save-state { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.save-state.dirty { color: #d97706; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center;
  color: var(--text-2); transition: .13s; flex: none;
}
.icon-btn:hover { background: #f1f3f7; color: var(--text); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.icon-btn.on { background: #eef2ff; color: #3730a3; }
.ed-main { display: flex; height: calc(100vh - 56px); }

.ed-left { width: 316px; flex: none; background: #fff; border-right: 1px solid var(--line); display: flex; }
.rail { width: 62px; flex: none; border-right: 1px solid var(--line-2); padding: 8px 0; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.rail-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0; color: var(--text-3);
  font-size: 11px; transition: .13s; border-left: 2px solid transparent;
}
.rail-item svg { width: 19px; height: 19px; }
.rail-item:hover { color: var(--text); background: #fafbfc; }
.rail-item.on { color: var(--accent); border-left-color: var(--accent); background: #fff7f4; }
.panel { flex: 1; overflow-y: auto; padding: 14px; }
.panel-title { font-size: 13px; font-weight: 600; margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; }
.panel-sub { font-size: 11px; color: var(--text-3); margin: 14px 0 8px; font-weight: 500; }

.ed-stage {
  flex: 1; position: relative; overflow: auto; display: flex; align-items: center; justify-content: center;
  background-color: #e9ecf2;
  background-image: radial-gradient(#d3d8e2 1px, transparent 1px);
  background-size: 18px 18px; padding: 40px;
}
.canvas-shell { position: relative; box-shadow: 0 10px 40px rgba(16, 24, 40, .16); background: #fff; flex: none; }
.canvas-container { background: #fff; }
.canvas-shell.dragover::after {
  content: "松开鼠标，添加图片"; position: absolute; inset: 0; background: rgba(37, 99, 235, .12);
  border: 2px dashed #2563eb; color: #1d4ed8; display: grid; place-items: center; font-size: 15px;
  font-weight: 600; pointer-events: none; z-index: 20;
}
.stage-bar {
  position: sticky; left: 0; bottom: 0; width: 100%; height: 42px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.zoom-pill {
  display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--line);
  border-radius: 20px; padding: 3px; box-shadow: var(--shadow-s); position: fixed; bottom: 14px; left: 50%;
  transform: translateX(-50%); z-index: 30;
}
.zoom-pill button { width: 30px; height: 28px; border-radius: 16px; color: var(--text-2); display: grid; place-items: center; }
.zoom-pill button:hover { background: #f1f3f7; }
.zoom-pill span { font-size: 12px; min-width: 46px; text-align: center; color: var(--text-2); }

.ed-right { width: 292px; flex: none; background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.right-tabs { display: flex; border-bottom: 1px solid var(--line); }
.right-tabs button { flex: 1; height: 44px; font-size: 13px; color: var(--text-3); border-bottom: 2px solid transparent; }
.right-tabs button.on { color: var(--text); font-weight: 600; border-bottom-color: var(--ink); }
.right-body { flex: 1; overflow-y: auto; padding: 14px; }

.prop-group { border-bottom: 1px solid var(--line-2); padding-bottom: 14px; margin-bottom: 14px; }
.prop-group:last-child { border-bottom: none; }
.prop-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.row { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; }
.row > * { min-width: 0; }
.row .lbl { font-size: 12px; color: var(--text-3); width: 34px; flex: none; }
.num-input { width: 100%; height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; font-size: 12px; outline: none; }
.num-input:focus { border-color: var(--ink); }
.color-swatch {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); padding: 0;
  overflow: hidden; flex: none; position: relative;
}
.color-swatch input { position: absolute; inset: -6px; width: 46px; height: 46px; border: none; padding: 0; opacity: 0; cursor: pointer; }
.seg { display: flex; background: #f1f3f7; border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { flex: 1; height: 27px; border-radius: 6px; font-size: 12px; color: var(--text-2); display: grid; place-items: center; }
.seg button.on { background: #fff; box-shadow: var(--shadow-s); color: var(--text); font-weight: 600; }
.color-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.color-dot { aspect-ratio: 1; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .07); cursor: pointer; transition: .12s; }
.color-dot:hover { transform: scale(1.14); }
.range-row { display: flex; align-items: center; gap: 8px; }
.range-row input[type=range] { flex: 1; accent-color: var(--ink); }

.layer-list { display: flex; flex-direction: column; gap: 3px; }
.layer-item {
  display: flex; align-items: center; gap: 7px; padding: 6px 7px; border-radius: 7px;
  font-size: 12px; cursor: pointer; border: 1px solid transparent;
}
.layer-item:hover { background: #f7f8fa; }
.layer-item.on { background: #fff4ef; border-color: #ffd9cc; }
.layer-item .lt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-item .opt { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; color: var(--text-3); flex: none; }
.layer-item .opt:hover { background: #e9ecf2; color: var(--text); }
.layer-item .opt.on { color: var(--ink); }
.layer-item .drag-handle { cursor: grab; color: #c4cad4; }

.side-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.side-item {
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 4px; display: flex;
  flex-direction: column; align-items: center; gap: 5px; font-size: 11px; color: var(--text-2);
  cursor: pointer; background: #fff; transition: .15s;
}
.side-item:hover { border-color: var(--ink); box-shadow: var(--shadow-s); }
.side-item svg { width: 22px; height: 22px; }
.tpl-mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tpl-mini { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; cursor: pointer; background: #f1f3f7; position: relative; }
.tpl-mini:hover { border-color: var(--ink); }
.tpl-mini .mini-thumb { width: 100%; aspect-ratio: 3/4; position: relative; overflow: hidden; }
.tpl-mini canvas { width: 100% !important; height: 100% !important; }
.tpl-mini .n { font-size: 11px; padding: 5px 7px; background: #fff; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.img-cell { aspect-ratio: 1; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; background: #f1f3f7; }
.img-cell img { width: 100%; height: 100%; object-fit: cover; }
.size-list { display: flex; flex-direction: column; gap: 5px; }
.size-item { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; font-size: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.size-item:hover { border-color: var(--ink); }

/* 右键菜单 */
.ctx-menu {
  position: fixed; z-index: 8000; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-l); padding: 6px; min-width: 168px; display: none;
}
.ctx-menu.show { display: block; }
.ctx-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.ctx-item:hover { background: #f5f6f8; }
.ctx-item.danger { color: #dc2626; }
.ctx-sep { height: 1px; background: var(--line-2); margin: 4px 2px; }

/* 导出弹窗 */
.export-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.export-opt {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 10px; text-align: center; cursor: pointer; transition: .15s;
}
.export-opt:hover, .export-opt.on { border-color: var(--ink); background: #fafbfc; }
.export-opt .big { font-size: 22px; font-weight: 700; }
.export-opt .small { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.preview-box { background: #eef1f6; border-radius: 12px; padding: 18px; display: grid; place-items: center; max-height: 66vh; overflow: auto; }
.preview-box img { max-width: 100%; max-height: 62vh; box-shadow: var(--shadow-m); }

/* 加载 */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #f1f3f7 25%, #e9ecf2 37%, #f1f3f7 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 移动端适配 */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-visual { height: 360px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .tpl-grid { grid-template-columns: repeat(3, 1fr); }
  .works-grid { grid-template-columns: repeat(3, 1fr); }
  .ed-left { width: 260px; }
  .ed-right { width: 250px; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 36px; }
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .ed-left { position: absolute; z-index: 50; height: calc(100vh - 56px); box-shadow: var(--shadow-l); transform: translateX(-100%); transition: .2s; }
  .ed-left.open { transform: none; }
  .ed-right { position: absolute; right: 0; z-index: 50; height: calc(100vh - 56px); box-shadow: var(--shadow-l); transform: translateX(100%); transition: .2s; }
  .ed-right.open { transform: none; }
  .ed-stage { padding: 14px; }
  .export-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-visual { height: 330px; margin-top: 10px; }
  .poster-card.p1 { width: 148px; left: 1%; top: 26px; }
  .poster-card.p2 { width: 118px; right: 12px; top: 0; }
  .poster-card.p3 { width: 132px; left: 34%; top: 104px; }
}