/* Approved Stories body styles. Other app controls, photos and excerpts inherit
   their existing styles; only attributed full-post text uses these colours. */
.nest-story-editor{--nest-story-ink:#19233f;--nest-story-border:#f2cdbf;--nest-story-action:#b73f28;color:var(--nest-story-ink);min-width:0;width:100%;margin:0 0 14px;font-family:inherit}
.nest-story-editor *{box-sizing:border-box}
.nest-story-editor [hidden]{display:none!important}
.nest-story-editor .nest-story-tools{border:1px solid var(--nest-story-border);border-bottom:0;border-radius:16px 16px 0 0;background:#fff9f6;padding:8px;display:grid;gap:8px}
.nest-story-editor .nest-story-tool-row{display:grid;grid-template-columns:44px minmax(0,1fr) minmax(84px,auto);gap:6px;align-items:stretch}
.nest-story-editor .nest-story-colour-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}
.nest-story-editor .nest-story-tool,.nest-story-editor .nest-story-panel-header button,.nest-story-editor .nest-story-swatch{appearance:none;-webkit-appearance:none;font:inherit;font-size:14px;line-height:1.25;min-height:44px;min-width:0;border:1px solid var(--nest-story-border);border-radius:12px;background:#fff;color:var(--nest-story-ink);cursor:pointer;padding:8px 10px;margin:0;text-align:left;box-shadow:none}
.nest-story-editor .nest-story-tool:focus-visible,.nest-story-editor .nest-story-swatch:focus-visible,.nest-story-editor .nest-story-panel-header button:focus-visible,.nest-story-editor .nest-story-editable:focus-visible{outline:2px solid var(--nest-story-action);outline-offset:2px}
.nest-story-editor select.nest-story-tool{appearance:auto;-webkit-appearance:menulist;font-size:16px;width:100%;padding:8px 10px}
.nest-story-editor .nest-story-bold-button{font-size:20px;font-weight:700;text-align:center;padding:7px}
.nest-story-editor .nest-story-bold-button[aria-pressed="true"],.nest-story-editor .nest-story-bold-button[aria-pressed="mixed"]{border-color:var(--nest-story-action);box-shadow:inset 0 0 0 1px var(--nest-story-action);background:#fce9e3}
.nest-story-editor .nest-story-reset-button{display:flex;align-items:center;justify-content:center;gap:5px;overflow-wrap:anywhere}
.nest-story-editor .nest-story-colour-toggle{display:flex;align-items:center;gap:7px;width:100%;padding:8px}
.nest-story-editor .nest-story-colour-toggle>span:last-child{margin-left:auto;flex:none}
.nest-story-editor .nest-story-choice-label{min-width:0;display:block;font-size:12px}
.nest-story-editor .nest-story-choice-label strong{font-size:12px;font-weight:600;display:block;overflow-wrap:anywhere}
.nest-story-editor .nest-story-choice-label small{display:block;font-size:11px;color:#667085;margin-top:3px;overflow-wrap:anywhere}
.nest-story-editor .nest-story-text-sample{font-weight:700;font-size:16px;line-height:1;flex:none;width:26px;text-align:center}
.nest-story-editor .nest-story-background-sample{width:24px;height:24px;border:1px solid #788398;border-radius:7px;flex:none;display:inline-block}
.nest-story-editor .nest-story-colour-panel{background:#fff9f6;border:1px solid var(--nest-story-border);border-bottom:0;padding:10px;min-width:0}
.nest-story-editor .nest-story-panel-header{display:flex;align-items:center;justify-content:space-between;gap:8px}
.nest-story-editor .nest-story-panel-header h3{font:inherit;font-size:14px;font-weight:700;color:var(--nest-story-ink);margin:0}
.nest-story-editor .nest-story-panel-header button{color:var(--nest-story-action);font-weight:600;min-width:60px;text-align:center}
.nest-story-editor .nest-story-colour-panel p{font-size:12px;line-height:1.4;color:#667085;margin:8px 0 10px}
.nest-story-editor .nest-story-swatches{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px;min-width:0}
.nest-story-editor .nest-story-swatch{display:flex;align-items:center;gap:6px;min-height:44px;padding:8px}
.nest-story-editor .nest-story-swatch-name{font-size:12px;overflow-wrap:anywhere;min-width:0}
.nest-story-editor .nest-story-swatch-check{margin-left:auto;color:var(--nest-story-action);font-size:18px;font-weight:700;min-width:16px;text-align:center;flex:none}
.nest-story-editor .nest-story-swatch[aria-pressed="true"]{border-color:var(--nest-story-action);box-shadow:inset 0 0 0 1px var(--nest-story-action);background:#fff9f6}
.nest-story-editor button:disabled,.nest-story-editor select:disabled{cursor:default;opacity:.55}
.nest-story-editor .nest-story-editable,.nest-story-formatted-body{font-family:inherit;font-size:12px;line-height:1.2;font-weight:400;color:#404040;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;min-width:0;text-align:left}
.nest-story-editor .nest-story-editable{padding:12px;border:1px solid var(--nest-story-border);border-radius:0 0 16px 16px;min-height:200px;width:100%;outline-offset:-3px;cursor:text}
.nest-story-editor .nest-story-editable:empty::before{content:attr(data-placeholder);color:#667085;pointer-events:none}
.nest-story-editor .nest-story-editable[aria-invalid="true"]{border-color:var(--nest-story-action);outline:1px solid var(--nest-story-action)}
.nest-story-editor .nest-story-editable[aria-disabled="true"]{cursor:default;opacity:.7}
.nest-story-editor .nest-story-editor-footer{display:flex;justify-content:flex-end;margin-top:5px;gap:6px}
.nest-story-editor .nest-story-count{font-size:12px;line-height:1.3;color:#667085}
.nest-story-editor .nest-story-editor-hint{font-size:12px;line-height:1.4;color:#667085;margin:7px 0 0}
.nest-story-editor .nest-story-editor-status{font-size:12px;line-height:1.4;color:var(--nest-story-action);margin:5px 0 0}
.nest-story-formatted-body{padding:14px;border-radius:16px;margin:12px 0;max-width:100%}
:is(.nest-story-editable,.nest-story-formatted-body) .nest-story-run--normal{font-size:12px;line-height:1.2}
:is(.nest-story-editable,.nest-story-formatted-body) .nest-story-run--large{font-size:16px;line-height:1.2}
:is(.nest-story-editable,.nest-story-formatted-body) .nest-story-run--heading{font-size:20px;line-height:1.2}
:is(.nest-story-editable,.nest-story-formatted-body) .nest-story-run--bold{font-weight:700}
:is(.nest-story-editable,.nest-story-formatted-body) .nest-story-colour--grey{color:#404040}
:is(.nest-story-editable,.nest-story-formatted-body) .nest-story-colour--coral{color:#9b3d2b}
:is(.nest-story-editable,.nest-story-formatted-body) .nest-story-colour--teal{color:#155e63}
:is(.nest-story-editable,.nest-story-formatted-body) .nest-story-colour--navy{color:#19233f}
:is(.nest-story-editable,.nest-story-formatted-body) .nest-story-colour--plum{color:#653e70}
:is(.nest-story-editable,.nest-story-formatted-body) .nest-story-colour--green{color:#245a3c}
:is(.nest-story-editable,.nest-story-formatted-body).nest-story-bg--default{background-color:#fff}
:is(.nest-story-editable,.nest-story-formatted-body).nest-story-bg--blush{background-color:#fce9e3}
:is(.nest-story-editable,.nest-story-formatted-body).nest-story-bg--cream{background-color:#fff6e7}
:is(.nest-story-editable,.nest-story-formatted-body).nest-story-bg--mint{background-color:#eaf4ed}
:is(.nest-story-editable,.nest-story-formatted-body).nest-story-bg--blue{background-color:#eaf1fa}
:is(.nest-story-editable,.nest-story-formatted-body).nest-story-bg--lavender{background-color:#f0ecf8}
@media(max-width:340px){.nest-story-editor .nest-story-colour-row{grid-template-columns:minmax(0,1fr)}.nest-story-editor .nest-story-swatches{grid-template-columns:minmax(0,1fr)}.nest-story-editor .nest-story-choice-label strong,.nest-story-editor .nest-story-swatch-name{font-size:13px}.nest-story-editor .nest-story-choice-label small{font-size:12px}.nest-story-editor .nest-story-tool-row{grid-template-columns:44px minmax(0,1fr) minmax(100px,auto)}}

/* Approved Stories reader/preview only. Existing Discover excerpts retain standard styling. */
[data-story-create-form].nest-story-previewing > :not([data-story-preview-pane]){display:none!important;}
[data-story-preview-pane][hidden]{display:none!important;}
.story-preview-pane .nest-story-post-title,#story-detail-screen .story-detail > h2{font-size:20px!important;line-height:1.25!important;font-weight:700!important;}
.story-preview-pane .nest-story-reader{display:block;}
.story-preview-pane .nest-story-reader .story-area{display:block;margin:8px 0 16px;}
.story-preview-pane .nest-story-preview-cover{display:block;width:100%;padding:0;margin:0 0 16px;background:#fff;border:0;border-radius:16px;overflow:hidden;}
.story-preview-pane .nest-story-preview-cover img{display:block;width:100%;height:auto;max-height:230px;object-fit:contain;}
.story-preview-pane .nest-story-preview-gallery .section-title{display:flex;justify-content:space-between;align-items:center;margin:16px 0 4px;gap:8px;}
.story-preview-pane .nest-story-preview-gallery h3{font-size:14px;margin:0;}
.story-preview-pane .nest-story-preview-gallery .hint{font-size:12px;line-height:1.4;margin:0 0 8px;}
.story-preview-pane .story-photo-grid,#story-detail-screen .story-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.story-preview-pane .story-photo-grid button,#story-detail-screen .story-photo-grid button{display:block;width:100%;min-width:0;aspect-ratio:1;padding:0;overflow:hidden;border-radius:12px;}
.story-preview-pane .story-photo-grid img,#story-detail-screen .story-photo-grid img{display:block;width:100%;height:100%;object-fit:cover;}
.story-preview-pane .story-form-actions{margin-top:16px;}
[data-story-create-form] .story-preview-pane .story-form-actions button{min-height:44px;}

/* Scope the new editor against the legacy modal-wide div grid. */
.story-create-modal .nest-story-editor{display:block;}
.story-create-modal .nest-story-editor .nest-story-tools{grid-template-columns:minmax(0,1fr);}
.story-create-modal .nest-story-editor .nest-story-editable{display:block;}
.story-create-modal .nest-story-formatted-body{display:block;}

.story-preview-pane .story-author{display:flex;align-items:center;gap:10px;}
.story-preview-pane .story-author>.story-avatar{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:10px;background:#fce9e3;color:#9b3d2b;font-size:16px;font-weight:700;}

@media(max-width:360px){
.story-create-modal .nest-story-editor .nest-story-tool-row{grid-template-columns:44px minmax(0,1fr);}
.story-create-modal .nest-story-editor .nest-story-reset-button{grid-column:1 / -1;}
}

@media(max-width:430px){.story-preview-pane .story-form-actions{grid-template-columns:minmax(0,1fr);}}

.story-preview-pane>.section-title{display:flex!important;flex-wrap:wrap;justify-content:space-between;gap:4px 8px!important;}

/* Reader/Preview website links only; the editor and Discover excerpts stay plain. */
.nest-story-formatted-body a.nest-story-link,.nest-story-formatted-body a.nest-story-link span{color:#9b3d2b;}
.nest-story-formatted-body a.nest-story-link{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.15em;overflow-wrap:anywhere;}
.nest-story-formatted-body a.nest-story-link:focus-visible{outline:2px solid #9b3d2b;outline-offset:2px;border-radius:2px;}
/* Stories alone fit the visible keyboard viewport; the card owns all scrolling. */
.modal[data-story-create-modal].nest-story-keyboard-fit{
  position:fixed!important;inset:auto!important;
  top:var(--nest-story-viewport-top)!important;left:var(--nest-story-viewport-left)!important;
  width:var(--nest-story-viewport-width)!important;height:var(--nest-story-viewport-height)!important;
  min-height:0!important;max-height:none!important;margin:0!important;padding:8px!important;
  box-sizing:border-box;align-items:stretch!important;justify-content:center!important;
}
.nest-story-keyboard-fit>.story-create-modal{
  width:min(340px,100%)!important;max-width:100%!important;
  height:100%!important;max-height:100%!important;min-height:0!important;margin:0!important;
  box-sizing:border-box;overflow-anchor:none;scroll-behavior:auto!important;
}
.nest-story-keyboard-fit [data-story-create-form]:not(.nest-story-previewing)>.story-form-actions{display:none!important}

/* Story focus zoom may coexist with a real software keyboard. */
html:has([data-story-create-modal].nest-story-keyboard-fit) .bottom-nav{display:none!important}

/* Approved 19 October 2026: compact photo guidance and draft footer. */
html:not(.nest-provider-mode):not(.nest-admin-web) .story-create-modal [data-story-create-form]{padding-bottom:0;row-gap:8px!important}
html:not(.nest-provider-mode):not(.nest-admin-web) .story-create-modal [data-story-photo-previews]{row-gap:8px!important;padding-block:0!important;margin-block:0!important}
html:not(.nest-provider-mode):not(.nest-admin-web) .story-create-modal :is(.nest-photo-note,.story-privacy-reminder){
  font-size:.75rem!important;line-height:1.35!important;font-weight:400!important;margin:0!important;
}
html:not(.nest-provider-mode):not(.nest-admin-web) .story-create-modal [data-story-photo-previews]>.nest-photo-note:first-of-type{font-size:.8125rem!important}
html:not(.nest-provider-mode):not(.nest-admin-web) .story-create-modal [data-story-create-form]>[data-story-draft-tools]{
  margin:0;padding:8px 0 0;gap:8px;
}
html:not(.nest-provider-mode):not(.nest-admin-web) .story-create-modal [data-story-draft-tools] :is(p,summary){
  font-size:.75rem!important;line-height:1.35!important;font-weight:400!important;
}
html:not(.nest-provider-mode):not(.nest-admin-web) .story-create-modal [data-story-draft-tools] [data-story-draft-status]{font-weight:400!important}
/* Keep the disclosure and form actions comfortably tappable. */
html:not(.nest-provider-mode):not(.nest-admin-web) .story-create-modal [data-story-draft-tools] summary{min-height:44px;box-sizing:border-box;padding:6px 0}

html:not(.nest-provider-mode):not(.nest-admin-web) .story-create-modal .nest-story-editor-hint{font-size:.75rem!important;line-height:1.35!important;margin:4px 0 0!important}
