/* Scoped redesign: legacy article and AI settings layout stay intact. */
#richpost-view { --work-ink:#272722; --work-muted:#72716a; --work-border:#e4e2db; display:grid; grid-template-columns:minmax(350px, .9fr) minmax(440px,1.1fr); gap:20px; max-width:1440px; margin:auto; color:var(--work-ink); font-family:'Noto Sans SC',sans-serif; }
#richpost-view .richpost-header { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; padding:16px 2px 12px; gap:24px; }
#richpost-view .richpost-header h1 { font-family:'Noto Sans SC',sans-serif; font-size:26px; letter-spacing:-.7px; margin:6px 0 10px; }
#richpost-view .richpost-header p { margin:0; font-size:13px; color:var(--work-muted); }
#richpost-save-status { font-size:12px; color:#557264; white-space:nowrap; }
#richpost-view .richpost-tabs { grid-column:1/-1; display:flex; border-bottom:1px solid var(--work-border); gap:28px; }
.richpost-tabs button { background:none; border:0; border-bottom:3px solid transparent; padding:12px 0; color:#77736c; cursor:pointer; font:inherit; font-size:14px; }
.richpost-tabs button[aria-pressed=true] { color:#a82f37; border-bottom-color:#a82f37; font-weight:700; }
#richpost-view .workspace-grid { display:contents; }
#richpost-view .control-panel, #richpost-view .workspace-side, #richpost-view .workspace-output { max-height:none; overflow:visible; padding:0; gap:16px; }
#richpost-view .workspace-main { grid-area:auto; grid-column:2; grid-row:3; max-width:none; }
#richpost-view .workspace-side { grid-area:auto; grid-column:1; grid-row:3; }
#richpost-view .workspace-output { grid-area:auto; grid-column:2; grid-row:3; }
#richpost-view[data-workspace=edit] .workspace-side, #richpost-view[data-workspace=edit] .workspace-output { display:none; }
#richpost-view[data-workspace=ideas] .control-panel, #richpost-view[data-workspace=ideas] .workspace-main { display:none; }
#richpost-view .panel-card, #richpost-view .preview-panel { border:1px solid var(--work-border); border-radius:12px; box-shadow:none; background:#fff; backdrop-filter:none; padding:24px; }
#richpost-view .panel-card::before { display:none; }
#richpost-view .control-panel > .panel-card:first-child { padding:0 2px; border:0; background:none; }
#richpost-view .control-panel > .panel-card:first-child .panel-kicker { display:none; }
#richpost-view .control-panel > .panel-card:first-child h1 { font-size:18px; margin-bottom:8px; }
#richpost-view h1, #richpost-view h2 { font-family:'Noto Sans SC',sans-serif; }
#richpost-view .panel-desc { max-width:none; font-size:13px; line-height:1.8; color:#72716a; }
#richpost-view .panel-kicker { color:#9c4246; font-size:11px; letter-spacing:1px; }
#richpost-view .field-label { color:#55554f; font-size:12px; }
#richpost-view textarea, #richpost-view .ai-input { border:1px solid var(--work-border); border-radius:7px; box-shadow:none; background:#fff; padding:16px; }
#richpost-view textarea:focus, #richpost-view .ai-input:focus { outline:2px solid #b36a6d; outline-offset:2px; }
#richpost-view .text-input { min-height:380px; height:44vh; font-size:14px; line-height:1.9; }
#richpost-view .summary-output { height:150px; font-size:13px; line-height:1.8; }
#richpost-view .copy-summary-card { background:#f8f8f5; border:0; border-radius:8px; padding:14px; }
#richpost-view .summary-status { color:#73736c; font-size:11px; }
#richpost-view button { box-shadow:none; }
#richpost-view .action-btn, #richpost-view .ghost-btn { border-radius:6px; background:#efefea; color:#45463f; font-size:13px; min-height:40px; }
#richpost-view .primary-btn, #richpost-view #export-btn { background:#a7353e; color:white; }
#richpost-view .button-row { position:sticky; bottom:0; background:#fff; padding:14px 0 0; z-index:4; display:flex; flex-wrap:wrap; gap:8px; }
#richpost-view .mini-btn, #richpost-view .mini-action-btn, #richpost-view .value-chip { border-radius:5px; background:#f3f2ed; color:#55554f; }
#richpost-view .tool-row { margin-top:16px; }
#richpost-view .preview-panel { height:calc(100vh - 230px); min-height:520px; max-height:none; position:sticky; top:16px; background:#eeeee8; padding:18px; }
#richpost-view .preview-head { background:#eeeee8; padding:0 0 16px; border-bottom:1px solid #dbdbd2; }
#richpost-view .preview-head h2 { font-size:16px; }
#richpost-view .preview-head-actions { flex-wrap:wrap; }
#richpost-view .preview-scale-control { padding:6px 0; background:none; box-shadow:none; }
.richpost-style-label { display:flex; gap:8px; align-items:center; color:#5c5c55; font-size:12px; }
#richpost-design { padding:7px; border:1px solid #d9d9d0; border-radius:5px; background:#fff; color:#333; }
#richpost-view .ai-output-panel { height:auto; min-height:450px; }
#richpost-view .ai-output-empty { background:#f7f7f3; border:1px dashed #d6d6cc; border-radius:8px; }
#richpost-view .topic-card { border-radius:8px; box-shadow:none; }
#richpost-view .topic-starters { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0; }
.topic-starters p { width:100%; font-size:12px; color:#777; margin:0; }
.topic-starters button { border:1px solid #deded5; border-radius:5px; padding:8px 10px; background:#f8f8f4; font-size:12px; color:#494b42; cursor:pointer; }
#richpost-view button:focus-visible { outline:2px solid #a7353e; outline-offset:3px; }
/* Export canvas stays independent of viewport width. */
#cards-root[data-design=editorial], #cards-root[data-design=ink] { --card-accent:#ab343d; --card-ink:#252823; --card-muted:#464941; }
#cards-root[data-design=ink] { --card-accent:#426455; }
#cards-root:not([data-design=classic]) .card { background:#fffcf6; box-shadow:none; border:1px solid #e3ddd1; }
#cards-root:not([data-design=classic]) .shape, #cards-root:not([data-design=classic]) .corner-flowers, #cards-root:not([data-design=classic]) .card::after, #cards-root:not([data-design=classic]) .text-card::before { display:none; }
#cards-root:not([data-design=classic]) .cover-content { align-items:flex-start; padding:58px 38px 44px; justify-content:space-between; gap:24px; }
#cards-root:not([data-design=classic]) .eyebrow-row { font-size:14px; letter-spacing:2px; }
#cards-root:not([data-design=classic]) .eyebrow-line { width:22px; }
#cards-root:not([data-design=classic]) .cover-title { align-items:flex-start; text-align:left; gap:22px; line-height:1.35; width:100%; }
#cards-root:not([data-design=classic]) .title-main { font-size:calc(46px * var(--cover-font-scale)); letter-spacing:0; text-wrap:balance; }
#cards-root:not([data-design=classic]) .title-accent { font-size:calc(46px * var(--cover-font-scale)); letter-spacing:0; text-wrap:balance; }
#cards-root:not([data-design=classic]) .tag-pill { border:0; border-top:1px solid #d9ccbc; border-radius:0; box-shadow:none; padding:14px 0 0; width:100%; font-size:12px; background:none; }
#cards-root:not([data-design=classic]) .text-title { font-size:23px; line-height:1.5; }
#cards-root:not([data-design=classic]) .text-block { font-size:calc(18px * var(--body-font-scale)); line-height:1.8; gap:13px; }
@media(max-width:1000px) {
 #richpost-view { grid-template-columns:minmax(0,1fr); }
 #richpost-view .workspace-main, #richpost-view .workspace-side, #richpost-view .workspace-output { grid-column:1; grid-row:auto; }
 #richpost-view .richpost-header { align-items:flex-start; flex-direction:column; gap:12px; }
 #richpost-view .richpost-header h1 { font-size:22px; }
 #richpost-view .preview-panel { height:auto; max-height:700px; position:static; }
 #richpost-view .text-input { height:320px; min-height:280px; }
}
body:has(#richpost-view.active) { background:#f5f5ef; }
body:has(#richpost-view.active) .app-menu { border:0; border-radius:0; box-shadow:none; background:none; justify-content:flex-start; width:100%; max-width:1440px; margin:0 auto; padding:0 0 12px; border-bottom:1px solid #e0e0d7; gap:6px; }
body:has(#richpost-view.active) .app-menu-btn { border-radius:5px; min-width:80px; padding:9px 20px; background:none; box-shadow:none; color:#727169; font-size:13px; }
body:has(#richpost-view.active) .app-menu-btn.active { background:#292d27; color:#fff; }
#richpost-view .button-row { top:0; bottom:auto; margin:0 0 18px; padding:0 0 14px; border-bottom:1px solid #e8e8e0; }
#richpost-view #export-btn { margin-left:auto; }
#richpost-view .richpost-header { padding-top:6px; padding-bottom:4px; }
#richpost-view .richpost-header h1 { font-size:24px; }
#richpost-view .preview-scale-control { border:0; }
#richpost-view .preview-scale-range { accent-color:#a7353e; }
#richpost-view #render-btn { background:#efefea; color:#45463f; }
@media(max-width:600px) {
 #richpost-view { gap:14px; }
 #richpost-view .richpost-header h1 { font-size:20px; line-height:1.5; }
 #richpost-view .button-row { display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; }
 #richpost-view .button-row .action-btn { width:auto; min-width:0; padding:8px 5px; font-size:11px; margin:0; }
 #richpost-view .panel-card { padding:16px; }
}
/* Pink journal: real raster stationery, with editable/exportable typography. */
#cards-root[data-design=journal] { --card-accent:#651d34; --card-ink:#461121; --card-muted:#492c32; }
#cards-root[data-design=journal] .card { border:0; background-color:#ecc3c7; background-size:100% 100%; }
#cards-root[data-design=journal] .cover-card { background-image:url('assets/richpost-journal/cover.png'); }
#cards-root[data-design=journal] .text-card { background-image:url('assets/richpost-journal/body.png'); padding:36px 35px 30px; }
#cards-root[data-design=journal] .cover-content { padding:20px 30px; justify-content:flex-start; align-items:stretch; gap:0; }
#cards-root[data-design=journal] .eyebrow-row { color:#48152a; font-weight:900; font-size:16px; letter-spacing:0; }
#cards-root[data-design=journal] .eyebrow-line { display:none; }
#cards-root[data-design=journal] .cover-title { position:absolute; top:84px; left:53px; right:29px; width:auto; gap:8px; text-align:left; line-height:1.15; transform:rotate(-2deg); }
#cards-root[data-design=journal] .title-main, #cards-root[data-design=journal] .title-accent { font-family:'Noto Sans SC',sans-serif; font-weight:900; font-size:calc(72px * var(--cover-font-scale) * var(--journal-cover-fit, 1)); letter-spacing:-2px; color:#490d24; text-wrap:balance; overflow-wrap:anywhere; }
#cards-root[data-design=journal] .title-main { text-decoration:underline; text-decoration-color:#f1d25a; text-decoration-thickness:12px; text-underline-offset:-4px; text-decoration-skip-ink:none; }
#cards-root[data-design=journal] .tag-pill { position:absolute; top:313px; left:36px; right:26px; width:auto; border:0; padding:0; white-space:normal; font-size:16px; font-weight:700; font-family:"Kaiti SC","STKaiti",serif; letter-spacing:1px; color:#64253b; text-align:center; transform:rotate(-2deg); }
#cards-root[data-design=journal] .journal-number { color:#ba717f; font-size:42px; line-height:1; font-weight:900; font-style:italic; margin:0 0 12px; }
#cards-root[data-design=journal] .text-title { font-size:32px; line-height:1.3; letter-spacing:-.6px; font-weight:900; padding:0; color:#4b1027; text-wrap:balance; }
#cards-root[data-design=journal] .title-rule { height:0; margin:10px 0; background:none; }
#cards-root[data-design=journal] .text-block { flex:1; min-height:0; font-size:calc(17px * var(--body-font-scale)); line-height:1.65; gap:12px; color:#492c32; }
#cards-root[data-design=journal] .text-block .lead-line { font-weight:700; color:#5c2335; }
#cards-root[data-design=journal] .text-block .leaf-line { background:#f9e28e; padding:7px 9px; font-weight:700; line-height:1.55; color:#491b27; }
#cards-root[data-design=journal] .text-block.dense { font-size:calc(15px * var(--body-font-scale)); gap:8px; }
#cards-root[data-design=journal] .text-block.ultra-dense { font-size:calc(14px * var(--body-font-scale)); gap:6px; }
#cards-root[data-design=journal] .journal-footer { font-size:11px; color:#854758; font-weight:700; padding-top:12px; text-align:center; }

#cards-root[data-design=journal] .journal-word { display:inline-block; }
