/* 管理页的工具字体保持清晰，访客不加载任何可见编辑控件。 */
.style-editor { position:fixed; z-index:150; right:18px; top:20px; width:348px; max-width:calc(100vw - 24px); font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; color:#292325; font-size:14px; line-height:1.6; }
.style-editor *, .style-editor *::before, .style-editor *::after { box-sizing:border-box; }
.style-editor [hidden] { display:none!important; }
.ed-panel { background:#fffbfc; border:1px solid #d6c8c1; box-shadow:0 12px 36px #4a293529; max-height:calc(100svh - 40px); overflow:auto; scrollbar-width:thin; scrollbar-color:#b69b93 #fff8fa; border-radius:14px; }
.ed-header { padding:20px 20px 16px; display:flex; gap:12px; justify-content:space-between; border-bottom:1px solid #ebdfdf; }
.ed-header h2 { font-weight:600; font-size:18px; line-height:1.5; margin:0 0 6px; font-family:inherit; }
.ed-header p { color:#6d545c; margin:0; font-size:12px; }
.ed-collapse { width:32px; height:32px; flex:none; border:0; border-radius:6px; background:#f4e9ec; padding:6px; cursor:pointer; color:inherit; }
.ed-collapse svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.5; }
.ed-launch { display:none; border:1px solid #ccb6aa; background:#fffbfc; color:#493039; padding:12px 18px; border-radius:24px; cursor:pointer; box-shadow:0 4px 16px #4a293522; font-weight:500; font-size:14px; line-height:1.5; }
.is-collapsed .ed-launch { display:block; margin-left:auto; }
.is-collapsed .ed-panel { display:none; }
.lb-open .style-editor, .bless-open .style-editor { visibility:hidden; }
.ed-auth { margin:16px 20px 0; padding-bottom:18px; border-bottom:1px solid #ebdfdf; }
.ed-auth h3 { font-size:16px; margin:0 0 8px; }
.ed-auth-copy { font-size:12px; color:#6d545c; margin:0 0 12px; }
.ed-fields { padding:20px; }
.style-editor label { display:block; font-size:13px; color:#57434a; }
.style-editor input, .style-editor select, .style-editor button { font-family:inherit; }
.style-editor select, .style-editor input[type=password] { display:block; width:100%; min-height:40px; font-size:14px; color:#292325; background:#fff; border:1px solid #d6c8c9; border-radius:6px; margin-top:6px; padding:8px; }
.style-editor input[type=password] { margin-bottom:12px; }
.style-editor input[type=color] { display:block; width:100%; height:40px; margin-top:6px; background:#fff; border:1px solid #d6c8c9; border-radius:6px; padding:4px; cursor:pointer; }
.ed-choose label + label { margin-top:14px; }
.style-editor textarea,.style-editor input[type=text] { display:block;width:100%;margin-top:6px;padding:9px;border:1px solid #d6c8c9;border-radius:6px;background:#fff;color:#292325;font:inherit;font-size:14px;line-height:1.5;resize:vertical; }
.style-editor textarea { min-height:92px;max-height:220px; }
.ed-content-actions { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px; }
.ed-content-actions button,.ed-small-action { min-height:40px;padding:8px;border:1px solid #d6c8c9;border-radius:6px;background:#fff;color:#493039;font:inherit;font-size:12px;cursor:pointer; }
.ed-content-actions button:disabled,.ed-small-action:disabled { opacity:.45;cursor:default; }
.ed-small-action { margin-top:8px;width:100%; }
.ed-opening-options { margin-top:14px;padding:12px;background:#f4e9ec;border-radius:6px; }
.ed-opening-options label+label { margin-top:10px; }
.ed-opening-options input[type=checkbox] { display:inline-block;width:auto;margin:0 6px 0 0;accent-color:#76505e;vertical-align:middle; }
/* 新增内容独立定位；原有物件及正文的排版不参与重新流动。 */
.content-text { position:absolute;z-index:8;font-family:var(--serif);font-size:24px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere; }
.content-photo { position:absolute;pointer-events:auto; }
#venue:has(>.content-text,>.content-photo),#rsvp:has(>.content-text,>.content-photo),#closing:has(>.content-text,>.content-photo) { position:relative; }
.ed-two { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:18px; }
.ed-row { margin-top:18px; }
.ed-row output { float:right; color:#292325; font-variant-numeric:tabular-nums; }
.ed-row input { display:block; width:100%; margin:12px 0 2px; accent-color:#76505e; cursor:pointer; }
.ed-details { margin-top:20px; padding-block:12px; border-top:1px solid #ebdfdf; border-bottom:1px solid #ebdfdf; }
.ed-details summary { cursor:pointer; color:#493039; min-height:30px; padding-top:4px; }
.ed-photo-group { margin-top:18px; }
.ed-mode { display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:#f4e9ec;border-radius:8px;margin:18px 0; }
.ed-mode button { min-height:40px;background:transparent;border:1px solid transparent;border-radius:5px;color:#62444f;font-size:14px;cursor:pointer; }
.ed-mode button[aria-pressed=true] { background:#fffbfc;border-color:#d6c8c9;color:#292325;box-shadow:0 2px 5px #4a293518; }
.ed-mode button:disabled { opacity:.45;cursor:default; }
.ed-note { font-size:12px;color:#6d545c;line-height:1.6;margin:14px 0 0; }
.ed-delete-tools { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px; }
.ed-delete-tools button { min-height:40px;padding:8px;border:1px solid #d6c8c9;border-radius:6px;background:#fff;font-size:12px;color:#493039;cursor:pointer; }
.ed-delete-tools button:disabled { opacity:.45;cursor:default; }
.ed-delete-tools [data-edit-act=delete-item] { color:#7b383f;border-color:#d5b7ba; }
.ed-signature-note, .ed-fit-note { font-size:12px; color:#6d545c; margin:14px 0 0; }
.ed-tools { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:22px; }
.ed-tools button, .ed-tools .ed-import, .ed-reset-confirm button { border:1px solid #d6c8c9; border-radius:6px; padding:8px; text-align:center; min-height:38px; background:#fff; font-size:12px; color:#493039; cursor:pointer; }
.ed-import input { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; }
.ed-reset-confirm { margin-top:12px; padding:12px; background:#f4e9ec; }
.ed-reset-confirm p { margin:0 0 8px; }
.ed-reset-confirm button { margin-right:6px; }
.ed-footer { position:sticky; bottom:0; padding:14px 20px 18px; background:#fffbfc; border-top:1px solid #ebdfdf; }
.ed-status { font-size:12px; color:#62444f; margin:0 0 10px; min-height:19px; }
.ed-status.is-error { color:#873d34; }
.ed-primary { width:100%; background:#65434f; color:#fff; border:1px solid #65434f; border-radius:7px; padding:10px; font-size:14px; cursor:pointer; min-height:42px; }
.ed-primary:disabled { background:#e7dde1; color:#74636a; border-color:#e7dde1; cursor:default; }
.ed-logout { width:100%; background:transparent; color:#6d545c; border:0; min-height:34px; margin-top:6px; cursor:pointer; }
.style-editor button:not(:disabled):hover, .ed-import:hover { filter:brightness(.95); }
.style-editor :focus-visible { outline:2px solid #87624b; outline-offset:3px; }
.style-editor ::selection { background:#ecd4df; color:#292325; }
.style-editor input { caret-color:#65434f; }
.style-edit-selected { outline:1px dashed #89674b; outline-offset:6px; }
@media(max-width:760px) {
  .style-editor { top:auto; bottom:70px; right:12px; width:calc(100vw - 24px); }
  .ed-panel { max-height:57svh; }
  .ed-header { padding:14px 16px 12px; }
  .ed-header h2 { font-size:16px; }
  .ed-fields { padding:16px; }
  .ed-footer { padding:10px 16px 12px; }
  .style-editor select,.style-editor input[type=password],.style-editor textarea,.style-editor input[type=text] { font-size:16px; }
}
@media(prefers-reduced-motion:no-preference) {
  .ed-panel { animation:editor-enter .2s ease-out; }
  @keyframes editor-enter { from { opacity:.8; translate:0 6px; } to { opacity:1; translate:0 0; } }
}
