/* Stories now use the same quiet document/list language as the saved library. */
.sn-workspace { max-width: 1060px; margin: 0 auto; }
.sn-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 24px; }
.sn-heading > div { min-width: 0; }
.sn-eyebrow { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 8px; }
.sn-heading h1 { color: var(--ink); font-size: var(--ui-title-size); line-height: 1.45; font-weight: 600; margin: 0 0 10px; }
.sn-heading > div > p:last-child { color: var(--muted); font-size: 16px; line-height: 1.8; margin: 0; }
.sn-heading > .button { flex-shrink: 0; }
.sn-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding: 0 0 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.7; }
.sn-summary > span,.sn-summary > button { display: flex; align-items: center; gap: 7px; }
.sn-summary svg { width: 15px; height: 15px; }
.sn-summary strong { color: var(--ink); font-weight: 550; }
.sn-summary button { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; min-height: 44px; }
.sn-resume { display: grid; grid-template-columns: 140px minmax(0,1fr) auto; align-items: center; gap: 20px; padding: 22px 24px; border: 1px solid var(--line); border-left: 4px solid var(--mint); border-radius: 10px; margin: 24px 0; background: white; }
.sn-resume-label { font-size: 13px; color: var(--muted); line-height: 1.8; }
.sn-resume-copy h2 { font-size: 18px; font-weight: 600; line-height: 1.7; overflow-wrap: anywhere; margin: 0 0 4px; }
.sn-resume-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.sn-prompt { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 32px; padding: 26px 28px; margin: 24px 0 36px; background: var(--ep-cream); border: 1px solid var(--line); border-radius: 14px; }
.sn-prompt-label { font-size: 13px; color: var(--muted); }
.sn-prompt h2 { font-size: 22px; font-weight: 550; line-height: 1.6; margin: 10px 0 8px; overflow-wrap: anywhere; }
.sn-prompt p { font-size: 14px; color: var(--muted); line-height: 1.8; margin: 0; }
.sn-prompt-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sn-prompt-actions > .button { background: white; }
.sn-text-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; border: 0; background: none; padding: 10px 0; color: var(--ep); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.sn-text-button svg { width: 16px; height: 16px; }
.sn-collection-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.sn-collection-heading h2 { font-size: var(--ui-section-size); font-weight: 600; line-height: 1.5; margin: 0; }
.sn-collection-heading > span { color: var(--muted); font-size: 13px; }
.sn-topics { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.sn-topic { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 9px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; white-space: nowrap; }
.sn-topic[aria-pressed="true"] { border-bottom-color: var(--ep); color: var(--ink); font-weight: 600; }
.sn-topic > span { min-width: 20px; text-align: center; background: var(--ep-light); border-radius: 4px; padding: 0 5px; font-size: 12px; font-weight: 400; }
.sn-entry { display: flex; width: 100%; align-items: center; gap: 20px; padding: 26px 8px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: left; }
.sn-entry:hover { background: var(--ep-cream); }
.sn-entry-icon { display: grid; place-items: center; align-self: flex-start; width: 44px; height: 52px; flex: 0 0 44px; background: var(--ep-light); border-radius: 9px; color: var(--ep); }
.sn-entry-icon svg { width: 23px; height: 23px; }
.sn-entry-copy { display: block; flex: 1; min-width: 0; }
.sn-entry-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.sn-entry-copy > strong { display: block; font-size: 19px; font-weight: 600; line-height: 1.7; overflow-wrap: anywhere; margin: 7px 0; }
.sn-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.sn-entry-open { display: flex; align-items: center; gap: 8px; flex-shrink: 0; color: var(--muted); font-size: 13px; }
.sn-entry-open svg { width: 14px; height: 14px; }
.sn-empty { display: flex; align-items: flex-start; gap: 20px; padding: 34px 24px; margin: 22px 0; background: var(--ep-cream); border: 1px dashed var(--line); border-radius: 12px; }
.sn-empty-icon { display: grid; place-items: center; width: 42px; height: 48px; flex-shrink: 0; background: white; border: 1px solid var(--line); border-radius: 8px; }
.sn-empty-icon svg { width: 24px; height: 24px; color: var(--muted); }
.sn-empty h3 { margin: 0 0 8px; font-size: 19px; font-weight: 550; line-height: 1.6; }
.sn-empty p { font-size: 14px; line-height: 1.8; color: var(--muted); margin: 0; }
.sn-empty-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; }
.sn-footnote { margin: 24px 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.sn-reader { max-width: 860px; }
.sn-reader-nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.sn-reader-nav .story-back { margin: 0; color: var(--muted); }
.sn-paper { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 44px 48px; }
.sn-paper-heading { border-bottom: 1px solid var(--line); padding-bottom: 26px; margin-bottom: 30px; }
.sn-paper-topic { font-size: 13px; color: var(--muted); }
.sn-reader .sn-paper-heading h1 { font-size: 30px; line-height: 1.6; font-weight: 600; margin: 12px 0 18px; overflow-wrap: anywhere; }
.sn-paper-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.sn-paper-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.sn-paper-meta svg { width: 14px; height: 14px; }
.sn-reader .sn-prose { padding: 0; border: 0; background: none; font-size: 17px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.sn-related { border-top: 1px solid var(--line); margin-top: 38px; padding-top: 24px; }
.sn-related h2 { font-size: 16px; margin: 0 0 18px; line-height: 1.6; }
.sn-related dl { margin: 0; }
.sn-related dl > div { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 16px; margin-top: 14px; }
.sn-related dt { color: var(--muted); font-size: 13px; line-height: 1.8; }
.sn-related dd { margin: 0; font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.sn-editor { max-width: 860px; }
.sn-editor-heading h1 { margin: 0 0 20px; font-size: var(--ui-title-size); font-weight: 600; line-height: 1.5; }
.sn-editor .story-editor-top { margin-bottom: 24px; }
.sn-editor #cloud-story-form { padding: 30px 36px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.sn-editor .story-field-label { margin-top: 14px; }
.sn-editor .story-field-label:first-of-type { margin-top: 0; }
.sn-draft-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; }
.sn-draft-row > span { min-width: 0; }
.sn-draft-row strong { display: block; font-size: 17px; line-height: 1.7; font-weight: 550; overflow-wrap: anywhere; }
.sn-draft-row small { display: block; font-size: 13px; line-height: 1.7; color: var(--muted); margin-top: 5px; }
.sn-draft-row svg { width: 16px; height: 16px; flex-shrink: 0; }
.sn-topic:focus-visible { outline-offset: -3px; }
@media (max-width: 760px) {
 .sn-heading { flex-wrap: wrap; align-items: flex-start; gap: 18px; }
 .sn-heading > div { flex-basis: 100%; }
 .sn-summary { gap: 6px 16px; }
 .sn-resume { grid-template-columns: minmax(0,1fr) auto; gap: 10px 14px; padding: 18px; }
 .sn-resume-label { grid-column: 1 / -1; }
 .sn-prompt { grid-template-columns: minmax(0,1fr); padding: 22px 20px; gap: 16px; margin-bottom: 28px; }
 .sn-prompt h2 { font-size: 20px; }
 .sn-prompt-actions { flex-direction: row; flex-wrap: wrap; gap: 12px 22px; justify-content: flex-start; }
 .sn-topics { flex-wrap: nowrap; overflow-x: auto; gap: 18px; scrollbar-width: thin; }
 .sn-entry { gap: 12px; padding: 22px 0; }
 .sn-entry-icon { width: 36px; height: 44px; flex-basis: 36px; }
 .sn-entry-copy > strong { font-size: 18px; }
 .sn-entry-open { font-size: 0; gap: 0; }
 .sn-empty { padding: 24px 18px; gap: 14px; }
 .sn-empty-icon { display: none; }
 .sn-paper { padding: 28px 22px; }
 .sn-reader .sn-paper-heading h1 { font-size: 25px; }
 .sn-paper-meta { gap: 6px 14px; }
 .sn-related dl > div { grid-template-columns: minmax(0,1fr); gap: 4px; }
 .sn-editor #cloud-story-form { padding: 22px 20px; }
 .sn-editor .story-title-input { font-size: 23px; }
}
@media (max-width: 390px) {
 .sn-resume { grid-template-columns: minmax(0,1fr); }
 .sn-resume > .button { justify-self: start; }
 .sn-paper,.sn-editor #cloud-story-form { padding-left: 16px; padding-right: 16px; }
}
