/* CSDown community chrome. Authored story canvases, text, media, drawings and
   background swatches deliberately retain their own colours and typography. */
body.portal-page.portal-community-theme :is(.stories-page,.stories-strip,.story-viewer-dialog,.sv-story,.story-delete-dialog){font-family:var(--font,"Segoe UI",Arial,sans-serif);color:var(--portal-text,#f0f1f3)}
body.portal-page.portal-community-theme :is(.stories-heading h1,.stories-empty h2,.stories-strip h2,.story-delete-dialog h2,.sv-delete-panel h2,.sv-error h2,.sv-views-panel h2){font-family:var(--font,"Segoe UI",Arial,sans-serif);font-weight:700;color:var(--portal-text,#f0f1f3);letter-spacing:-.03em}
body.portal-page.portal-community-theme .stories-page{padding-top:28px;padding-bottom:42px}
body.portal-page.portal-community-theme .stories-heading{gap:20px;margin-bottom:24px}
body.portal-page.portal-community-theme .stories-heading h1{font-size:clamp(28px,3.5vw,42px);line-height:1.15;margin:8px 0 12px}
body.portal-page.portal-community-theme .stories-heading h1>span{color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme :is(.stories-heading p,.story-preview-caption>span,.story-preview-help,.story-field-help,.story-color-input,.story-publish>p,.story-source-card>span,.story-source-card>p,.stories-empty p,.stories-strip-empty span,.story-author-link small,.story-delete-dialog p){color:var(--portal-muted,#9298a3)}
body.portal-page.portal-community-theme :is(.stories-back,.story-text-button,.story-source-card>a,.stories-strip>header>a){font-family:var(--font,"Segoe UI",Arial,sans-serif);color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme :is(.stories-back,.story-text-button,.story-source-card>a,.stories-strip>header>a):hover{color:var(--portal-accent-hover,#ffb954)}
body.portal-page.portal-community-theme :is(.story-editor-preview,.story-editor-panel,.stories-strip,.story-watch-card,.stories-empty,.story-delete-dialog){background:var(--portal-panel,#1b1e23);border:1px solid var(--portal-border,#30343c);border-radius:14px;box-shadow:none}
body.portal-page.portal-community-theme .story-editor{width:100%;max-width:1200px;gap:24px;grid-template-columns:minmax(280px,1fr) minmax(300px,1fr)}
body.portal-page.portal-community-theme .story-editor-preview{padding:20px;top:100px;min-width:0}
body.portal-page.portal-community-theme .story-editor-panel{padding:22px;gap:20px;min-width:0}
body.portal-page.portal-community-theme .story-preview-caption{color:var(--portal-text,#f0f1f3)}
body.portal-page.portal-community-theme :is(.story-fieldset legend,.story-field>label,.story-pack-label,.story-source-card strong,.stories-strip-empty strong,.story-author-link){color:var(--portal-text,#f0f1f3)}
body.portal-page.portal-community-theme :is(.story-field label>span,.story-field label>output){color:var(--portal-muted,#9298a3)}
body.portal-page.portal-community-theme :is(.story-fieldset legend,.story-field>label,.story-pack-label){font-size:13px;font-weight:600}
body.portal-page.portal-community-theme :is(.story-modes,.story-text-sizes){padding:4px;background:var(--portal-raised,#22262d);border:1px solid var(--portal-border,#30343c);border-radius:10px;gap:4px}
body.portal-page.portal-community-theme :is(.story-modes label>span,.story-text-sizes label>span){font-family:var(--font,"Segoe UI",Arial,sans-serif);color:var(--portal-muted,#9298a3);border-radius:8px;font-weight:600;min-height:40px}
body.portal-page.portal-community-theme :is(.story-modes input:checked+span,.story-text-sizes input:checked+span){background:#f5a53b14;background:color-mix(in srgb,var(--portal-accent,#f5a53b) 9%,var(--portal-panel,#1b1e23));border-color:var(--portal-accent,#f5a53b);color:var(--portal-accent,#f5a53b);box-shadow:none}
body.portal-page.portal-community-theme .story-file-picker{background:var(--portal-raised,#22262d);border:1px dashed var(--portal-border,#30343c);border-radius:10px;color:var(--portal-accent,#f5a53b);font-weight:600}
body.portal-page.portal-community-theme .story-file-picker:hover{border-color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .stories-page :is(textarea,select,input[type=url]){font-family:var(--font,"Segoe UI",Arial,sans-serif);background:var(--portal-bg,#111316)!important;color:var(--portal-text,#f0f1f3)!important;border-color:var(--portal-border,#30343c)!important;border-radius:10px!important;line-height:1.6}
body.portal-page.portal-community-theme .stories-page :is(textarea,input[type=url])::placeholder{color:var(--portal-muted,#9298a3);opacity:1}
body.portal-page.portal-community-theme .stories-page :is(textarea,select,input[type=url]):focus{border-color:var(--portal-accent,#f5a53b)!important}
body.portal-page.portal-community-theme .stories-page select{min-height:44px;color-scheme:dark}
body.portal-page.portal-community-theme .story-color-input input{background:var(--portal-raised,#22262d);border-color:var(--portal-border,#30343c);border-radius:8px}
body.portal-page.portal-community-theme :is(.story-position-controls,.story-selected-sticker,.story-design-page .story-publish){border-color:var(--portal-border,#30343c)}
body.portal-page.portal-community-theme .story-position-controls>summary{color:var(--portal-text,#f0f1f3);font-weight:600}
body.portal-page.portal-community-theme .stories-page input[type=range]{accent-color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .stories-page .button{font-family:var(--font,"Segoe UI",Arial,sans-serif);font-size:13px;font-weight:600;border-radius:8px}
body.portal-page.portal-community-theme :is(.stories-page,.story-delete-dialog) .button-outline{background:var(--portal-raised,#22262d);border-color:var(--portal-border,#30343c);color:var(--portal-text,#f0f1f3)!important}
body.portal-page.portal-community-theme :is(.stories-page,.story-delete-dialog) .button-outline:hover{background:#2b3038;border-color:var(--portal-accent,#f5a53b);color:var(--portal-accent,#f5a53b)!important}
body.portal-page.portal-community-theme :is(.story-submit-status,.story-design-status){color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .story-source-card{background:var(--portal-raised,#22262d);border-color:var(--portal-border,#30343c);border-radius:10px}
body.portal-page.portal-community-theme .story-source-preview{background:var(--portal-raised,#22262d);border:1px solid var(--portal-border,#30343c);border-radius:8px;color:var(--portal-text,#f0f1f3)}
body.portal-page.portal-community-theme .story-design-tools button{background:var(--portal-raised,#22262d);border-color:var(--portal-border,#30343c);border-radius:8px;color:var(--portal-muted,#9298a3);font-family:var(--font,"Segoe UI",Arial,sans-serif);font-weight:600}
body.portal-page.portal-community-theme .story-design-tools button:hover{color:var(--portal-text,#f0f1f3);border-color:#4b515c}
body.portal-page.portal-community-theme .story-design-tools button[aria-expanded=true]{background:#f5a53b14;background:color-mix(in srgb,var(--portal-accent,#f5a53b) 9%,var(--portal-panel,#1b1e23));border-color:var(--portal-accent,#f5a53b);color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .story-tool-panel{background:var(--portal-raised,#22262d);border-color:var(--portal-border,#30343c);border-radius:10px;padding:16px}
body.portal-page.portal-community-theme .story-sticker-picker{scrollbar-color:#4a505a var(--portal-raised,#22262d)}
body.portal-page.portal-community-theme .story-sticker-picker button{background:var(--portal-panel,#1b1e23);border-color:var(--portal-border,#30343c);border-radius:8px}
body.portal-page.portal-community-theme .story-sticker-picker button:hover{background:#2b3038;border-color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .story-background-swatches button{border-color:#5d626c}
body.portal-page.portal-community-theme .story-filter-options button{background:var(--portal-panel,#1b1e23);border-color:var(--portal-border,#30343c);border-radius:8px;color:var(--portal-muted,#9298a3);font-family:var(--font,"Segoe UI",Arial,sans-serif);font-weight:600}
body.portal-page.portal-community-theme .story-filter-options button[aria-pressed=true]{background:#f5a53b14;background:color-mix(in srgb,var(--portal-accent,#f5a53b) 9%,var(--portal-panel,#1b1e23));border-color:var(--portal-accent,#f5a53b);color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme :is(.stories-page,.stories-strip,.story-viewer-dialog,.story-delete-dialog) :focus-visible{outline:2px solid var(--portal-accent,#f5a53b);outline-offset:4px}
body.portal-page.portal-community-theme :is(.story-modes input:focus-visible+span,.story-text-sizes input:focus-visible+span,.story-file-picker:focus-within){outline:2px solid var(--portal-accent,#f5a53b);outline-offset:3px}
body.portal-page.portal-community-theme .story-canvas.is-dropping{outline-color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .stories-grid{gap:16px}
body.portal-page.portal-community-theme .story-tile{border:1px solid var(--portal-border,#30343c);border-radius:14px;box-shadow:none}
body.portal-page.portal-community-theme .story-tile:hover{border-color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .story-tile::after{background:linear-gradient(transparent,#101316db)}
body.portal-page.portal-community-theme .story-tile-author small{color:#d3d7de}
body.portal-page.portal-community-theme .story-avatar{background:var(--portal-raised,#22262d)}
body.portal-page.portal-community-theme .stories-empty{border-style:dashed;padding:36px 24px}
body.portal-page.portal-community-theme .stories-empty>svg{color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .stories-empty h2{font-size:26px}
body.portal-page.portal-community-theme .stories-strip{padding:20px}
body.portal-page.portal-community-theme .stories-strip h2{font-size:18px;line-height:1.3}
body.portal-page.portal-community-theme .stories-strip-items{scrollbar-color:#4a505a transparent}
body.portal-page.portal-community-theme :is(.stories-strip .story-tile,.story-create-tile){border-radius:10px}
body.portal-page.portal-community-theme .story-create-tile{background:var(--portal-raised,#22262d);border:1px dashed var(--portal-border,#30343c);color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .story-create-tile:hover{border-color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .story-create-tile>span{background:#f5a53b14;background:color-mix(in srgb,var(--portal-accent,#f5a53b) 9%,var(--portal-panel,#1b1e23));border:1px solid #f5a53b33;box-shadow:none;border-radius:8px}
body.portal-page.portal-community-theme .story-create-tile small{color:var(--portal-muted,#9298a3)}
body.portal-page.portal-community-theme .story-step{background:var(--portal-raised,#22262d);border-color:var(--portal-border,#30343c);color:var(--portal-accent,#f5a53b);border-radius:8px}
body.portal-page.portal-community-theme .story-watch-source{background:var(--portal-raised,#22262d);color:var(--portal-text,#f0f1f3);border-top:1px solid var(--portal-border,#30343c)}
body.portal-page.portal-community-theme .story-watch-source small{color:var(--portal-muted,#9298a3)}
body.portal-page.portal-community-theme .story-delete-open{color:var(--portal-muted,#9298a3);border-radius:8px}
body.portal-page.portal-community-theme .story-delete-open:hover{color:#f3a5b7;background:#4d2632}
body.portal-page.portal-community-theme .story-delete-dialog::backdrop{background:#080a0dd9}
body.portal-page.portal-community-theme .story-delete-dialog h2{font-size:25px}
body.portal-page.portal-community-theme :is(.story-form-error,.story-inline-error){border-color:#6a3542;background:#39242c;color:#f4b3bf;border-radius:10px}
body.portal-page.portal-community-theme .stories-notice{border:1px solid #345648;background:#20362d;color:#b9dfcd;border-radius:10px}
body.portal-page.portal-community-theme .story-delete-confirm{background:#b63c60!important;border-color:#b63c60!important;color:#fff!important}
/* Viewer chrome is neutral dark; the scene and its authored layers stay intact. */
body.portal-page.portal-community-theme .story-viewer-dialog{background:#111316f5;color:var(--portal-text,#f0f1f3)}
body.portal-page.portal-community-theme .story-viewer-dialog::backdrop{background:#080a0de8}
body.portal-page.portal-community-theme :is(.sv-story,.sv-error){background:var(--portal-panel,#1b1e23);border:1px solid var(--portal-border,#30343c);border-radius:14px;box-shadow:0 16px 50px #0006}
body.portal-page.portal-community-theme .sv-story{scrollbar-color:#4a505a var(--portal-panel,#1b1e23)}
body.portal-page.portal-community-theme .sv-header{background:linear-gradient(#080a0db8,transparent)}
body.portal-page.portal-community-theme .sv-author strong{font-family:var(--font,"Segoe UI",Arial,sans-serif);font-weight:600}
body.portal-page.portal-community-theme .sv-avatar{background:var(--portal-raised,#22262d);border-color:#d3d7de80}
body.portal-page.portal-community-theme .sv-progress>.is-complete,body.portal-page.portal-community-theme .sv-progress i{background:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .sv-paused{background:#111316cc;color:#fff;border:1px solid #ffffff26;border-radius:8px}
body.portal-page.portal-community-theme .sv-footer{background:var(--portal-panel,#1b1e23);border-top:1px solid var(--portal-border,#30343c);gap:10px}
body.portal-page.portal-community-theme .sv-reply{background:var(--portal-bg,#111316);border-color:var(--portal-border,#30343c);border-radius:10px}
body.portal-page.portal-community-theme .sv-reply textarea{font-family:var(--font,"Segoe UI",Arial,sans-serif);font-size:12px;background:transparent!important;color:var(--portal-text,#f0f1f3)!important;border:0!important;border-radius:0!important}
body.portal-page.portal-community-theme .sv-reply textarea::placeholder{color:var(--portal-muted,#9298a3)}
body.portal-page.portal-community-theme .sv-reply:focus-within{border-color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .sv-reply textarea:focus-visible{outline:none}
body.portal-page.portal-community-theme .sv-reply button{color:var(--portal-accent,#f5a53b);border-radius:8px}
body.portal-page.portal-community-theme :is(.sv-top-actions button,.sv-engagement button){border-radius:8px}
body.portal-page.portal-community-theme :is(.sv-login,.sv-footer-caption,.sv-source small,.sv-delete-panel p,.sv-share-panel label,.sv-error p,.sv-loading,.sv-views-button,.sv-views-panel p){color:var(--portal-muted,#9298a3)}
body.portal-page.portal-community-theme :is(.sv-login:hover,.sv-status,.sv-status a){color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .sv-source{background:var(--portal-raised,#22262d);border-color:var(--portal-border,#30343c);color:var(--portal-text,#f0f1f3)}
body.portal-page.portal-community-theme :is(.sv-delete-panel,.sv-share-panel,.sv-views-panel){background:var(--portal-raised,#22262d);border-color:var(--portal-border,#30343c);color:var(--portal-text,#f0f1f3)}
body.portal-page.portal-community-theme :is(.sv-delete-panel button,.sv-share-panel button,.sv-error button,.sv-error a,.sv-views-panel button){font-family:var(--font,"Segoe UI",Arial,sans-serif);background:var(--portal-panel,#1b1e23);border-color:var(--portal-border,#30343c);color:var(--portal-text,#f0f1f3);border-radius:8px}
body.portal-page.portal-community-theme :is(.sv-delete-panel button,.sv-share-panel button,.sv-error button,.sv-error a,.sv-views-panel button):hover{border-color:var(--portal-accent,#f5a53b);color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .sv-delete-panel .sv-delete-confirm{background:#b63e5c;border-color:#b63e5c;color:#fff}
body.portal-page.portal-community-theme .sv-share-panel input{background:var(--portal-bg,#111316)!important;color:var(--portal-text,#f0f1f3)!important;border-color:var(--portal-border,#30343c)!important;border-radius:10px!important;font-family:var(--font,"Segoe UI",Arial,sans-serif)}
body.portal-page.portal-community-theme :is(.sv-step,.sv-close){background:var(--portal-raised,#22262d);border:1px solid var(--portal-border,#30343c);color:var(--portal-text,#f0f1f3);border-radius:8px}
body.portal-page.portal-community-theme :is(.sv-step,.sv-close):hover{background:#2b3038;border-color:var(--portal-accent,#f5a53b);color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .sv-views-panel{border-top:1px solid var(--portal-border,#30343c);border-radius:14px 14px 0 0}
body.portal-page.portal-community-theme .sv-views-panel h2{font-size:18px}
body.portal-page.portal-community-theme :is(.sv-views-panel li a,.sv-views-panel li>span){color:var(--portal-text,#f0f1f3)}
/* Repost cards belong to the site UI, not to the author's artwork. Media remains unchanged. */
body.portal-page.portal-community-theme .story-repost{background:var(--portal-panel,#1b1e23);color:var(--portal-text,#f0f1f3);border:1px solid var(--portal-border,#30343c);border-radius:14px;box-shadow:0 8px 30px #0005}
body.portal-page.portal-community-theme .story-repost-cover{background:var(--portal-raised,#22262d)}
body.portal-page.portal-community-theme .story-repost .story-repost-fallback{color:var(--portal-muted,#9298a3)}
body.portal-page.portal-community-theme .story-repost-body>small{font-family:var(--font,"Segoe UI",Arial,sans-serif);color:var(--portal-accent,#f5a53b);font-weight:600}
body.portal-page.portal-community-theme .story-repost-body>strong{font-family:var(--font,"Segoe UI",Arial,sans-serif);font-weight:700}
body.portal-page.portal-community-theme .story-repost-open{font-family:var(--font,"Segoe UI",Arial,sans-serif);color:var(--portal-muted,#9298a3);border-color:var(--portal-border,#30343c)}
body.portal-page.portal-community-theme .story-repost-content:hover .story-repost-open{color:var(--portal-accent,#f5a53b)}
body.portal-page.portal-community-theme .story-repost-content:focus-visible{outline-color:var(--portal-accent,#f5a53b)}
@media(max-width:900px){body.portal-page.portal-community-theme .story-editor{grid-template-columns:minmax(240px,1fr) minmax(270px,1fr);gap:18px}body.portal-page.portal-community-theme :is(.story-editor-preview,.story-editor-panel){padding:18px}}
@media(max-width:700px){body.portal-page.portal-community-theme .story-editor{display:flex;flex-direction:column;align-items:stretch;gap:16px}body.portal-page.portal-community-theme .story-editor-preview{position:static}body.portal-page.portal-community-theme .story-editor-panel{padding:16px}body.portal-page.portal-community-theme .story-preview-caption{max-width:none}body.portal-page.portal-community-theme .story-editor-preview .story-canvas{max-width:280px;margin-inline:auto}body.portal-page.portal-community-theme .story-design-page .story-publish>div{justify-content:flex-end}}
@media(max-width:650px){body.portal-page.portal-community-theme .stories-page{padding-top:20px}body.portal-page.portal-community-theme .stories-heading h1{font-size:28px}body.portal-page.portal-community-theme :is(.stories-strip,.stories-empty){padding:16px}body.portal-page.portal-community-theme .story-tool-panel{padding:13px}body.portal-page.portal-community-theme .stories-page :is(textarea,select,input[type=url]){font-size:16px}body.portal-page.portal-community-theme .story-design-tools button{font-size:11px}body.portal-page.portal-community-theme .sv-reply textarea{font-size:16px}body.portal-page.portal-community-theme .sv-story{border-radius:14px}body.portal-page.portal-community-theme .sv-footer{padding:12px 10px}body.portal-page.portal-community-theme .sv-engagement{gap:4px}body.portal-page.portal-community-theme .story-repost{border-radius:10px}}
@media(max-width:380px){body.portal-page.portal-community-theme .story-design-tools{grid-template-columns:repeat(2,minmax(0,1fr))}body.portal-page.portal-community-theme .story-publish>div .button{width:100%}body.portal-page.portal-community-theme .story-sticker-picker{grid-template-columns:repeat(4,minmax(0,1fr))}body.portal-page.portal-community-theme .story-colors{grid-template-columns:1fr}body.portal-page.portal-community-theme .sv-footer{gap:5px}body.portal-page.portal-community-theme .sv-engagement{gap:0}body.portal-page.portal-community-theme .sv-source{padding-inline:10px}}
@media(prefers-reduced-motion:reduce){body.portal-page.portal-community-theme .stories-page .button{transition:none;transform:none}}
