/* Approved create-page layout. Scope excludes account lists and third-party forms. */
.sp-create .sp-submit-help{color:#4a6257;font-size:14px;line-height:1.6;max-width:none;margin:22px 0 16px}
.sp-create .sp-submit-dialog{box-sizing:border-box;width:calc(100% - 32px);max-width:550px;max-height:calc(100dvh - 32px);overflow:auto;padding:32px;border:1px solid #d8e1db;border-radius:20px;background:#fff;color:#263d3a;box-shadow:0 20px 65px #14281f30}
.sp-submit-dialog::backdrop{background:#172a2466}
.sp-create .sp-submit-dialog h2{font-size:26px;letter-spacing:-.4px;line-height:1.35;margin:16px 32px 14px 0}
.sp-create .sp-submit-dialog p{font-size:16px;line-height:1.6;color:#52655e;margin:0 0 18px}
.sp-create .sp-submit-dialog .sp-submit-pet{border-bottom:1px solid #d8e1db;padding-bottom:16px;color:#263d3a;font-size:14px;overflow-wrap:anywhere}
.sp-create .sp-submit-icon{width:32px;height:32px;color:#246853}
.sp-create .sp-submit-close{position:absolute;top:18px;right:18px;width:40px;height:40px;min-height:40px;padding:0;border:0;background:transparent;color:#52655e;font-size:24px}
.sp-create .sp-submit-dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:26px}
.sp-create .sp-submit-dialog-actions button{min-height:46px;border-radius:7px;padding:11px 18px;font-size:15px;line-height:1.4}
.sp-create .sp-submit-dialog button:focus-visible{outline:3px solid #397d66;outline-offset:4px}
.sp-create .sp-submit-fallback{margin-top:20px}
@media(max-width:650px){.sp-create .sp-submit-dialog{padding:25px 22px}.sp-create .sp-submit-dialog h2{font-size:24px}.sp-create .sp-submit-dialog-actions{flex-direction:column-reverse}.sp-create .sp-submit-dialog-actions button{width:100%}}
body.stillpaw-editor-page .stillpaw-main { max-width:1000px; margin-inline:auto; padding:32px 36px 48px; }
body.stillpaw-editor-page .stillpaw-main > h1 { font-size:34px; line-height:1.2; letter-spacing:-.8px; margin:0 0 14px; }
body.stillpaw-editor-page .stillpaw-main .wp-block-post-content { margin-top:0; }
.sp-create { --sp-muted:#59636e; --sp-line:#d8dee4; --sp-action:#25634e; --sp-subtle:#f6f8fa; line-height:1.6; }
.sp-create .sp-editor-fields > nav { justify-content:flex-end; font-size:13px; }
.sp-create .sp-editor-fields > p:first-of-type { max-width:none; color:var(--sp-muted); }
.sp-create .sp-section { border:1px solid var(--sp-line); border-radius:10px; padding:24px; margin:24px 0; }
.sp-create h2 { margin:0 0 18px; line-height:1.35; }
.sp-create label { font-size:14px; font-weight:500; }
.sp-create .sp-help,.sp-create .sp-optional { font-size:13px; color:var(--sp-muted); }
.sp-create [data-counter] { text-align:right; }
.sp-create :is(input:not([type=hidden]),select,textarea) { margin-top:6px; padding:10px 12px; }
.sp-create textarea { min-height:150px; }
.sp-create button { color:var(--sp-text); background:#fff; border-color:var(--sp-line); font-size:14px; font-weight:400; padding:8px 14px; }
.sp-create button:hover:not(:disabled) { background:var(--sp-subtle); filter:none; }
.sp-create button.sp-primary { background:var(--sp-action); color:#fff; border-color:var(--sp-action); }
.sp-create button:disabled { cursor:default; opacity:.55; }
.sp-create .sp-actions { gap:12px; }
.sp-create [aria-labelledby=sp-privacy] .sp-fields { grid-template-columns:minmax(0,1fr); gap:8px; }
.sp-create .sp-check { font-weight:400; }
.sp-create .sp-check input { padding:0; margin:0; }
.sp-create #sp-comments-help,.sp-create #sp-days-help { margin-left:30px; }
.sp-create .sp-photo-section > .sp-help:first-of-type { display:none; }
.sp-create .sp-upload-box { background:var(--sp-subtle); border:1px dashed var(--sp-line); border-radius:8px; padding:22px; text-align:center; }
.sp-create .sp-photo-upload { margin:0; }
.sp-create .sp-enhanced-upload label { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 14px; background:#fff; border:1px solid var(--sp-line); border-radius:6px; cursor:pointer; }
.sp-create .sp-enhanced-upload:focus-within label { outline:2px solid var(--sp-action); outline-offset:3px; }
.sp-create .sp-enhanced-upload input[type=file] { position:absolute; width:1px; height:1px; min-height:0; padding:0; overflow:hidden; clip-path:inset(50%); }
.sp-create .sp-photo-list { display:block; margin:16px 0 0; }
.sp-create .sp-photo-list > li { display:grid; grid-template-columns:64px minmax(0,1fr) auto; gap:12px; align-items:center; padding:14px 0; border-bottom:1px solid var(--sp-line); }
.sp-create .sp-photo-list img { width:64px; height:64px; object-fit:contain; background:var(--sp-subtle); border-radius:6px; }
.sp-create .sp-photo-label p { color:var(--sp-muted); font-size:13px; margin:0; }
.sp-create .sp-photo-actions { display:flex; gap:6px; align-items:start; flex-wrap:wrap; }
.sp-create .sp-photo-delete { margin:0; max-width:230px; }
.sp-create .sp-photo-delete summary { padding:8px 14px; min-height:44px; border:1px solid var(--sp-line); border-radius:6px; text-decoration:none; font-size:14px; }
.sp-create .sp-photo-delete p { font-size:13px; }
.sp-create .sp-photo-actions > .sp-help { max-width:200px; }
.sp-create .sp-queue-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-block:12px; font-size:14px; }
.sp-create .sp-preview-hero { display:grid; grid-template-columns:minmax(0,390px) minmax(0,1fr); gap:36px; margin-block:32px; }
.sp-create .sp-preview-image { aspect-ratio:1; background:var(--sp-subtle); border:1px solid var(--sp-line); border-radius:10px; display:grid; place-items:center; overflow:hidden; }
.sp-create .sp-preview-image img { width:100%; height:100%; object-fit:contain; min-height:0; }
.sp-create .sp-preview-nav { justify-content:space-between; margin-top:12px; }
.sp-create [data-preview=name] { font-size:40px; }
.sp-create .sp-preview-quote { font-size:22px; }
.sp-create .sp-preview-story { border-top:1px solid var(--sp-line); margin-top:28px; padding-top:28px; }
.sp-create .sp-preview-story p { white-space:pre-wrap; }
@media(max-width:700px) {
 body.stillpaw-editor-page .stillpaw-main { padding:24px 18px 36px; }
 .sp-create .sp-section { padding:18px; }
 .stillpaw-app .sp-fields input[type="date"] {
  -webkit-appearance:none;
  appearance:none;
  box-sizing:border-box;
  width:100%;
  min-width:0;
  max-width:100%;
  text-align:start;
 }
 .stillpaw-app .sp-fields input[type="date"]::-webkit-date-and-time-value { text-align:start; }
 .sp-create .sp-fields,.sp-create .sp-preview-hero { grid-template-columns:minmax(0,1fr); }
 .sp-create .sp-photo-list > li { grid-template-columns:64px minmax(0,1fr); }
 .sp-create .sp-photo-actions { grid-column:1/-1; }
 .sp-create .sp-photo-actions > .sp-help { max-width:none; }
}

/* Override the generic reading measure only on this controlled workspace page. */
body.stillpaw-editor-page .stillpaw-main { box-sizing:border-box; width:100%; }
body.stillpaw-editor-page .stillpaw-main > *, body.stillpaw-editor-page .stillpaw-main .wp-block-post-content > * { max-width:none; }
body.stillpaw-editor-page .stillpaw-header { padding:22px 32px; border-bottom:1px solid #d8dee4; }
body.stillpaw-editor-page .stillpaw-header .wp-block-site-title { max-width:none; font-size:24px; font-weight:650; letter-spacing:-.8px; }
.sp-create textarea { height:150px; }
.sp-create .sp-photo-actions button[disabled] { pointer-events:none; }
@media(max-width:700px) { body.stillpaw-editor-page .stillpaw-header { padding:18px; } }

/* Returned drafts inherit the approved editor; only its state header differs. */
body.stillpaw-returned-page .stillpaw-main > h1 { display:none; }
.sp-create .sp-editor-fields > .sp-return-nav { justify-content:flex-start; }
.sp-create .sp-return-back { display:inline-flex; align-items:center; min-height:44px; padding:8px 14px; border:1px solid var(--sp-line); border-radius:6px; color:var(--sp-text); font-size:14px; text-decoration:none; }
.sp-create .sp-return-back:hover { background:var(--sp-subtle); }
.sp-create .sp-return-title { font-size:34px; line-height:1.2; letter-spacing:-.8px; margin:24px 0; }
.sp-create .sp-review-feedback { padding:24px; border-radius:10px; margin:24px 0; }
.sp-create .sp-review-feedback p { max-width:72ch; }
.sp-create .sp-review-feedback h2 { margin:0 0 18px; }
.sp-create .sp-return-status { margin:14px 0; color:var(--sp-action); }
.sp-create .sp-return-status.sp-error { color:var(--sp-error); }
@media(max-width:700px) { .sp-create .sp-review-feedback { padding:18px; } }

/* Published photo management shares the create component without restyling other editor fields. */
.sp-published-photos .sp-photo-section > .sp-published-photo-help:first-of-type { display:block; font-size:14px; margin:0 0 20px; }
.sp-published-photos .sp-photo-label { min-width:0; overflow-wrap:anywhere; }
.sp-published-photos .sp-photo-actions { justify-content:flex-end; }
.sp-published-photos .sp-photo-actions form { margin:0; }
.sp-published-photos .sp-photo-actions button { white-space:nowrap; }
.sp-published-photos .sp-photo-delete[data-photo-enhanced] { grid-column:1/-1; max-width:none; width:100%; }
.sp-published-photos .sp-photo-delete[data-photo-enhanced]:not([open]) { display:none; }
.sp-published-photos .sp-photo-confirm { padding:16px; background:var(--sp-subtle); border:1px solid var(--sp-line); border-radius:6px; }
.sp-published-photos .sp-photo-confirm p { margin:8px 0 14px; font-size:14px; }
.sp-published-photos .sp-photo-confirm form { display:inline-block; margin:0 6px 0 0; }
.sp-published-photos .sp-photo-confirm .sp-delete-button { color:var(--sp-error); border-color:var(--sp-error); background:#fff; }
.sp-published-photos .sp-photo-confirm button { margin-bottom:4px; }
.sp-published-photos .sp-photo-status:empty { display:none; }
.sp-published-photos .sp-photo-status,.sp-published-photos .sp-queue-row { overflow-wrap:anywhere; }
@media(max-width:700px) { .sp-published-photos .sp-photo-actions { justify-content:flex-start; } }

.sp-published-photos h2 { font-size:26px; }
@media(max-width:700px) { .sp-published-photos h2 { font-size:23px; } }
/* Approved published-editor refinement; photo controls retain their existing component styles. */
@font-face{font-family:StillPawEditor;src:url('../fonts/memorial-dmsans-400.ttf') format('truetype');font-display:swap}
body.stillpaw-published-editor{background:#f6f6f0}
body.stillpaw-published-editor .stillpaw-main{max-width:1200px;padding:32px 36px 64px}
body.stillpaw-published-editor .stillpaw-main>h1{font-family:StillPawEditor,sans-serif;font-size:32px;letter-spacing:-.6px;color:#253c39}
.sp-editor-polish.stillpaw-app{--sp-text:#253c39;--sp-muted:#606f69;--sp-line:#d9e1d7;--sp-action:#246853;background:transparent;font:16px/1.6 StillPawEditor,Arial,sans-serif}
.sp-editor-polish>.sp-actions{font-size:14px;gap:22px;margin:0 0 16px}
.sp-editor-polish .sp-published-state{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:13px;color:#606f69;margin:0 0 28px}
.sp-editor-polish .sp-published-state span{background:#e7efdf;color:#385b40;border-radius:6px;padding:3px 10px;font-size:12px}
.sp-editor-polish .sp-editor-panel{background:#fff;border:1px solid #d9e1d7;border-radius:16px;padding:28px 32px;margin:0 0 22px}
.sp-editor-polish .sp-editor-panel .sp-section{margin:0;padding:0;border:0}
.sp-editor-polish .sp-editor-panel .sp-section+.sp-section{margin-top:26px;padding-top:24px;border-top:1px solid #e4e9df}
.sp-editor-polish .sp-editor-panel h2{font-size:22px;line-height:1.35;margin:0 0 8px}
.sp-editor-polish #sp-memory-tags{font-size:17px}
.sp-editor-polish .sp-editor-panel .sp-fields{gap:22px 28px;margin-top:22px}
.sp-editor-polish .sp-editor-panel label{font-size:14px;font-weight:400}
.sp-editor-polish .sp-editor-panel .sp-optional{font-size:12px;color:#606f69;margin-left:5px}
.sp-editor-polish .sp-editor-panel .sp-help{font-size:13px;line-height:1.6;margin:6px 0 0;max-width:75ch}
.sp-editor-polish .sp-editor-panel [data-counter]{font-size:12px;color:#606f69;text-align:right}
.sp-editor-polish .sp-editor-panel [data-counter].sp-over-limit{color:#a32232}
.sp-editor-polish .sp-editor-panel :is(input:not([type=hidden]):not([type=checkbox]),textarea,select){font:16px/1.6 StillPawEditor,Arial,sans-serif;border:1px solid #bdcdbf;border-radius:8px;padding:10px 12px;min-height:46px;margin-top:7px}
.sp-editor-polish .sp-editor-panel textarea{min-height:145px}
.sp-editor-polish .sp-editor-panel .sp-check{display:flex;align-items:flex-start;gap:10px}
.sp-editor-polish .sp-editor-panel .sp-check input{accent-color:#246853;width:18px;height:18px;min-height:18px;flex:0 0 18px;margin:3px 0 0;padding:0}
.sp-editor-polish .sp-editor-panel button{font:14px/1.6 StillPawEditor,Arial,sans-serif;border-radius:8px;min-height:44px;padding:10px 18px}
.sp-editor-polish .sp-delete-actions{margin-top:22px}
.sp-editor-polish .sp-published-privacy>button{margin-top:22px}
.sp-editor-polish .sp-content-recovery{margin-top:16px}
.sp-editor-polish .sp-content-recovery .sp-notice,.sp-editor-polish .sp-settings-status{font-size:13px;line-height:1.6;padding:8px 12px;width:fit-content;max-width:100%;border:0;border-radius:8px;background:#edf3e9;color:#375b40;margin:16px 0 0}
.sp-editor-polish .sp-content-recovery .sp-notice.sp-error,.sp-editor-polish .sp-settings-status.sp-error{color:#804b36;background:#fbefe8}
.sp-editor-polish .sp-settings-status:empty{display:none}
.sp-editor-polish .sp-content-recovery .sp-actions:not(:has(:not([hidden]))){display:none}
.sp-editor-polish .sp-error-summary{font-size:14px;background:#fbefe8;color:#804b36;border:0}
@media(max-width:700px){body.stillpaw-published-editor .stillpaw-main{padding:24px 16px 40px}body.stillpaw-published-editor .stillpaw-main>h1{font-size:28px}.sp-editor-polish .sp-editor-panel{padding:23px 20px}.sp-editor-polish .sp-editor-panel h2{font-size:20px}.sp-editor-polish .sp-editor-panel .sp-fields{grid-template-columns:minmax(0,1fr);gap:19px}.sp-editor-polish .sp-editor-panel .sp-delete-actions{align-items:stretch}.sp-editor-polish .sp-editor-panel .sp-delete-actions>button[type=submit],.sp-editor-polish .sp-published-privacy>button{width:100%}}
/* Restore the photo component's original white surface inside the paper-colored editor. */
.sp-editor-polish .sp-published-photos .sp-photo-section{background:#fff}
/* Outrank the generic network-recovery panel only in this approved editor. */
.sp-editor-polish.stillpaw-app .sp-content-recovery{border:0;background:transparent;border-radius:0;padding:0;margin:16px 0 0}
.sp-editor-polish.stillpaw-app .sp-content-recovery .sp-notice{display:flex;align-items:flex-start;gap:8px;padding:8px 12px;margin:0 0 12px;background:#edf3e9;border-radius:8px}
.sp-editor-polish.stillpaw-app .sp-content-recovery .sp-notice.sp-error{background:#fbefe8}
.sp-editor-polish.stillpaw-app .sp-content-recovery [role=status]:focus{outline:none}
.sp-editor-polish.stillpaw-app .sp-content-recovery .sp-notice::before{content:'';display:block;flex:0 0 18px;width:18px;height:18px;margin-top:1px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m7 12 3 3 7-7'/%3E%3C/svg%3E") center/contain no-repeat}
.sp-editor-polish.stillpaw-app .sp-content-recovery .sp-notice.sp-error::before{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6m0 3v1'/%3E%3C/svg%3E")}

.sp-editor-polish .sp-editor-delete{display:flex;justify-content:flex-end;margin-top:24px}
.sp-editor-polish .sp-editor-delete .sp-delete-entry{font:14px/1.6 StillPawEditor,Arial,sans-serif;min-height:44px;padding:10px 18px;border-radius:8px}

/* Short instructions may use the full editor width; retain natural mobile wrapping. */
.sp-create .sp-editor-fields > p.sp-help,.sp-create .sp-review-feedback > p.sp-help{max-width:none}

/* Restoration confirmation shares the workspace card palette and contained actions. */
.sp-editor-polish .sp-restoration-dialog{box-sizing:border-box;width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:32px;border:1px solid #d5dfd5;border-radius:20px;background:#fff;color:#263e3a}
.sp-editor-polish .sp-restoration-dialog::backdrop{background:rgb(20 38 33 / .38)}
.sp-editor-polish .sp-restoration-dialog h2{margin:0 0 16px;font-size:26px}
.sp-editor-polish .sp-restoration-dialog .sp-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
.sp-editor-polish .sp-restoration-dialog [data-restoration-cancel]{background:#fff;color:#246854;border:1px solid #ccd8cf}
.sp-restoration [data-restoration-error]{color:#9c3030}
@media(max-width:480px){.sp-editor-polish .sp-restoration-dialog{padding:24px}.sp-editor-polish .sp-restoration-dialog .sp-actions{flex-direction:column}.sp-editor-polish .sp-restoration-dialog button{width:100%}}
