/* ============================================================
   团享创作台 · 样式
   复用 style.css 的设计变量，仅补齐创作台所需布局
   ============================================================ */

/* ---------- 页头 ---------- */
.st-head { padding: 46px 0 30px; background: linear-gradient(180deg, var(--soft), #fff); }
.st-head .eyebrow { margin-bottom: 14px; }
.st-head h1 {
  font-size: clamp(24px, 3.4vw, 36px); font-weight: 700;
  letter-spacing: -.7px; line-height: 1.3; margin-bottom: 12px;
}
.st-head p { color: var(--ink-2); font-size: 15px; line-height: 1.85; max-width: 720px; }
.st-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.st-badges span {
  font-size: 12.5px; color: var(--blue); background: var(--blue-l);
  border: 1px solid #D9E6FF; border-radius: 999px; padding: 5px 12px;
}
.st-badges span.warn { color: #8A5A00; background: #FFF7E6; border-color: #FFE1AC; }

/* ---------- 主栅格 ---------- */
.st-body { padding: 30px 0 70px; }
.st-grid {
  display: grid; grid-template-columns: minmax(0,1fr) 372px minmax(0,1fr);
  gap: 26px; align-items: start; max-width: 1280px;
}
.st-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 1px 2px rgba(18,22,31,.03);
}
.st-panel > h3 {
  font-size: 14px; font-weight: 600; color: var(--ink);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.st-panel > h3 .num {
  width: 20px; height: 20px; border-radius: 6px; background: var(--ink); color: #fff;
  font-size: 11.5px; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; flex: none;
}
.st-panel > h3 small { color: var(--ink-3); font-weight: 400; font-size: 12px; margin-left: auto; }
.st-panel h4 {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  margin: 18px 0 9px; letter-spacing: .2px;
}
.st-panel h4:first-of-type { margin-top: 0; }

/* ---------- 分类标签 ---------- */
.st-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.st-tabs button {
  font-size: 12.5px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  cursor: pointer; transition: .15s;
}
.st-tabs button:hover { border-color: #C9D6F0; color: var(--blue); }
.st-tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 模板网格 ---------- */
.tpl-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  max-height: 520px; overflow-y: auto; padding-right: 4px;
}
.tpl-card {
  position: relative; border: 2px solid transparent; border-radius: 10px;
  overflow: hidden; cursor: pointer; background: var(--soft);
  aspect-ratio: 9 / 16; transition: .16s;
}
.tpl-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -12px rgba(18,22,31,.5); }
.tpl-card.on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,87,214,.14); }
.tpl-card svg { display: block; width: 100%; height: 100%; }
.tpl-card .tpl-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 6px 5px; font-size: 10.5px; color: #fff; line-height: 1.3;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.6));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tpl-card .tpl-check {
  position: absolute; top: 5px; right: 5px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--blue); color: #fff;
  font-size: 10px; display: none; align-items: center; justify-content: center;
  line-height: 1;
}
.tpl-card.on .tpl-check { display: flex; }

/* ---------- 预览 ---------- */
.st-preview { position: sticky; top: 82px; }
.pv-stage {
  position: relative; width: 100%; aspect-ratio: 9 / 16;
  border-radius: 16px; overflow: hidden; background: #111;
  box-shadow: 0 18px 40px -26px rgba(18,22,31,.65);
  user-select: none;
}
.pv-bg, .pv-bg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pv-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 28%, rgba(0,0,0,.16) 56%, rgba(0,0,0,.66) 100%);
}
.pv-inner { position: absolute; inset: 0; padding: 7% 7.5% 6%; display: flex; flex-direction: column; }
.pv-tag {
  align-self: flex-start; font-size: 10px; letter-spacing: .5px;
  color: #fff; background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.55);
  padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(4px);
}
.pv-main { margin-top: auto; }
.pv-title {
  color: #fff; font-size: 19px; font-weight: 700; line-height: 1.34;
  letter-spacing: -.2px; margin-bottom: 9px; word-break: break-word;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
  white-space: pre-line;
}
.pv-body {
  color: rgba(255,255,255,.92); font-size: 11.5px; line-height: 1.72;
  white-space: pre-wrap; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.pv-tags {
  margin-top: 10px; color: #FFD79A; font-size: 10.5px; line-height: 1.7;
  word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pv-brand {
  margin-top: 12px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: space-between;
  color: rgba(255,255,255,.62); font-size: 9.5px; letter-spacing: .4px;
}
.pv-brand b { color: rgba(255,255,255,.9); font-weight: 600; }

/* ---------- 预览操作 ---------- */
.pv-actions { display: grid; gap: 8px; margin-top: 14px; }
.pv-actions .btn { width: 100%; justify-content: center; padding: 11px 16px; font-size: 14px; }
.pv-actions .btn-ghost {
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
}
.pv-actions .btn-ghost:hover { border-color: #C9D6F0; color: var(--blue); }
.pv-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.7; margin-top: 10px; }
.pv-count { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; display: flex; justify-content: space-between; }

/* ---------- 表单 ---------- */
.st-field { margin-bottom: 13px; }
.st-field label {
  display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500;
}
.st-field input, .st-field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 11px; font-size: 13px; color: var(--ink); font-family: inherit;
  line-height: 1.65; background: #fff; resize: vertical; transition: .15s;
}
.st-field input:focus, .st-field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,87,214,.1);
}
.st-field input::placeholder, .st-field textarea::placeholder { color: #B4BBC8; }

/* ---------- 话题 chips ---------- */
.chip-box { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.chip-box button {
  font-size: 12px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  cursor: pointer; transition: .14s;
}
.chip-box button:hover { border-color: #FFD79A; color: #8A5A00; background: #FFFBF2; }
.chip-box button.on { background: #FFF4E0; border-color: #FFC65C; color: #8A5A00; font-weight: 500; }

/* ---------- 样例文案列表 ---------- */
.copy-list { display: grid; gap: 8px; max-height: 236px; overflow-y: auto; padding-right: 4px; }
.copy-item {
  text-align: left; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; padding: 9px 11px; cursor: pointer; transition: .14s;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.65;
}
.copy-item:hover { border-color: #C9D6F0; background: #FAFCFF; color: var(--ink); }
.copy-item b { display: block; font-size: 12.5px; color: var(--ink); font-weight: 600; margin-bottom: 3px; }

/* ---------- 底部分隔 ---------- */
.st-hint {
  margin-top: 26px; padding: 16px 18px; background: var(--soft);
  border: 1px solid var(--line-2); border-radius: 10px;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.8;
}
.st-hint b { color: var(--ink); }

/* ---------- Toast ---------- */
.st-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; font-size: 13px; padding: 10px 20px;
  border-radius: 999px; opacity: 0; pointer-events: none; transition: .24s; z-index: 99;
  box-shadow: 0 12px 28px -14px rgba(0,0,0,.6); max-width: 82vw; text-align: center;
}
.st-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 上传自己的照片 ---------- */
.up-block {
  margin-bottom: 14px; padding: 12px; border: 1px dashed #CBD6E8;
  border-radius: 10px; background: #FAFCFF;
}
.up-row { display: flex; flex-wrap: wrap; gap: 8px; }
.up-btn {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; padding: 8px 12px;
  border-radius: 8px; border: 1px solid var(--blue); background: var(--blue-l);
  color: var(--blue); font-weight: 500; cursor: pointer; transition: .15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.up-btn:hover { background: #E7F0FF; }
.up-del {
  flex: none; font-size: 12.5px; padding: 8px 11px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  cursor: pointer; transition: .15s;
}
.up-del:hover { border-color: #C9D6F0; color: var(--blue); }
.up-tip { font-size: 11.5px; color: var(--ink-3); line-height: 1.7; margin-top: 9px; }
.up-tip b { color: var(--ink-2); font-weight: 600; }

/* ---------- 我的作品 ---------- */
.st-works { padding: 8px 0 26px; }
.st-works .wrap { max-width: 1280px; }
.wk-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.wk-head h2 { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -.3px; }
.wk-head p { font-size: 12.5px; color: var(--ink-2); line-height: 1.75; margin-top: 6px; max-width: 640px; }
.wk-count {
  font-size: 12.5px; color: var(--ink-2); background: var(--soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; flex: none;
}
.wk-empty {
  padding: 26px 20px; text-align: center; font-size: 12.5px; color: var(--ink-3);
  background: #fff; border: 1px dashed #D5DEEE; border-radius: 12px; line-height: 1.8;
}
.wk-grid {
  display: flex; flex-wrap: wrap; gap: 16px;
}
.wk-card { width: 132px; min-width: 0; }
.wk-thumb {
  position: relative; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden;
  background: var(--soft); border: 1px solid var(--line); cursor: pointer;
  transition: .16s;
}
.wk-thumb:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -14px rgba(18,22,31,.55); }
.wk-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wk-del {
  position: absolute; top: 5px; right: 5px; width: 21px; height: 21px;
  border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer; display: flex;
  align-items: center; justify-content: center; opacity: 0; transition: .15s;
  padding: 0;
}
.wk-thumb:hover .wk-del { opacity: 1; }
@media (hover: none) { .wk-del { opacity: .85; } }
.wk-meta { margin-top: 7px; }
.wk-meta b {
  display: block; font-size: 12px; color: var(--ink); font-weight: 600;
  line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wk-meta span { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.wk-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.7; margin-top: 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .st-grid { grid-template-columns: minmax(0,1fr) 330px; }
  .st-preview { grid-column: 1 / -1; order: -1; max-width: 340px; margin: 0 auto; }
  .tpl-grid { grid-template-columns: repeat(4, 1fr); max-height: none; }
}
@media (max-width: 820px) {
  .st-grid { grid-template-columns: 1fr; gap: 18px; }
  .st-preview { position: static; max-width: 300px; }
  .tpl-grid { grid-template-columns: repeat(4, 1fr); }
  .copy-list { max-height: none; }
  .st-panel { padding: 16px; }
}
@media (max-width: 520px) {
  .tpl-grid { grid-template-columns: repeat(3, 1fr); }
  .st-head { padding: 30px 0 22px; }
  .pv-title { font-size: 17px; }
  .pv-body { font-size: 11px; }
  .wk-grid { gap: 10px; }
  .wk-card { width: calc((100% - 20px) / 3); }
  .wk-head h2 { font-size: 18px; }
}
