/* /create/ 页面专属样式 */
.create-main { padding-top: 28px; }
.create-title { margin-bottom: 4px; font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
.create-sub { margin-bottom: 20px; }
.create-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); align-items: start; }
.editor { min-width: 0; }
.preview-col { min-width: 0; position: sticky; top: 16px; }
fieldset.tpl-picker { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.tpl-picker legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.tpl-buttons { display: grid; gap: 8px; }
.tpl-btn { text-align: left; font: 600 .95rem/1.3 var(--font-body); padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; min-height: 44px; }
.tpl-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tpl-btn:focus-visible { outline: 3px solid #b83a57; outline-offset: 2px; }
input[type=file] { width: 100%; font: inherit; }
.err { color: #a3162f; font-size: .875rem; margin: 6px 0 0; font-weight: 600; }
.err[hidden], .publish-note[hidden] { display: none; }
.is-invalid { border-color: #a3162f !important; }
.counter-over { color: #a3162f; font-weight: 600; }
.thumbs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs li { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(42,27,31,.8); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; padding: 0; }
.thumbs button:focus-visible { outline: 3px solid #b83a57; outline-offset: 1px; }
.editor-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.editor-actions .hint { margin: 0; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.preview-head h2 { margin: 0; }
.preview-head .btn { width: auto; }
.publish-note { background: var(--accent-soft); border: 1px solid #b83a57; border-radius: var(--radius); padding: 12px 14px; margin: 0 0 12px; font-size: .95rem; }
.preview-frame { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; min-height: 460px; display: flex; flex-direction: column; }
.preview-stage { flex: 1; display: flex; flex-direction: column; }
.preview-stage:empty { display: none; }
.preview-stage .tpl { flex: 1; }
.preview-empty { margin: auto; padding: 40px 24px; text-align: center; }
.preview-empty[hidden] { display: none; }
.watermark { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; overflow: hidden; z-index: 5; }
.watermark span { transform: rotate(-30deg); white-space: nowrap; font: 700 clamp(1.4rem, 5vw, 2.6rem)/1 var(--font-body); color: rgba(42,27,31,.22); text-shadow: 0 0 2px rgba(255,255,255,.7); letter-spacing: .02em; }
.action-bar { display: none; }

@media (max-width: 860px) {
  .create-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-col { position: static; }
  .preview-head .btn { display: none; }
  .create-main { padding-bottom: 84px; }
  .action-bar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--bg); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .action-bar .btn { flex: 1; width: auto; padding: 14px 10px; }
  .preview-frame { min-height: 420px; }
  .site-footer { margin-bottom: 70px; }
}
#clear-draft { border: 0; font: inherit; font-size: .95rem; cursor: pointer; min-height: 44px; }
#clear-draft:focus-visible { outline: 3px solid #b83a57; outline-offset: 2px; }
