/* Hallmark · macrostructure: Workbench · tone: 도시 편집 · anchor hue: cyan · theme: existing Riso
 * Hallmark · pre-emit critique: P4 H5 E4 S5 R5 V4
 * states: default · hover · focus · active · disabled · loading · error · success */
@font-face{font-family:'Weekend Plex';src:url('/assets/fonts/IBMPlexSansKR-Regular.woff2?v=055a35664c3c') format('woff2');font-weight:400;font-style:normal;font-display:block}
@font-face{font-family:'Weekend Plex';src:url('/assets/fonts/IBMPlexSansKR-Medium.woff2?v=c00dcd8a9c32') format('woff2');font-weight:500;font-style:normal;font-display:block}
@font-face{font-family:'Weekend Plex';src:url('/assets/fonts/IBMPlexSansKR-Bold.woff2?v=cf874a368dc2') format('woff2');font-weight:600 700;font-style:normal;font-display:block}
@font-face{font-family:'Weekend Plex Display';src:url('/assets/fonts/IBMPlexSansKR-Bold.woff2?v=cf874a368dc2') format('woff2');font-weight:400;font-style:normal;font-display:block}
:root{--font-post-display:'Weekend Plex Display',sans-serif;--font-post-body:'Weekend Plex',sans-serif;--color-post-paper:oklch(96% .018 75);--color-post-paper-2:oklch(93% .02 75);--color-post-rule:oklch(84% .023 65);--color-post-muted:oklch(45% .02 60);--color-post-ink:oklch(18% .025 40);--color-post-accent:oklch(58% .170 220);--color-post-accent-dark:oklch(44% .075 212)}

.social-post-dialog{box-sizing:border-box;inset:0;margin:auto;width:min(1240px,calc(100% - 32px));height:auto;max-height:calc(100dvh - 32px);padding:var(--space-md) var(--space-xl);border:var(--rule-strong) solid var(--color-ink);background:var(--color-paper);color:var(--color-ink);overflow-y:auto;overscroll-behavior:contain}
.social-post-dialog::backdrop{background:var(--color-backdrop)}
.post-editor{color:var(--color-ink);font-family:var(--font-post-body);min-width:0}
.post-editor *, .post-editor *::before,.post-editor *::after{box-sizing:border-box}
.post-editor-header{display:flex;align-items:center;justify-content:space-between;gap:var(--space-md);border-bottom:var(--rule-strong) solid var(--color-ink);padding-bottom:var(--space-xs);margin-bottom:var(--space-sm)}
.post-editor h2{font-family:var(--font-post-display);font-size:var(--text-lg);font-style:normal;margin:0;word-break:keep-all;overflow-wrap:anywhere;min-width:0}
.post-workbench{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:var(--space-xl)}
.post-preview-panel{min-width:0;display:flex;flex-direction:column;gap:var(--space-sm)}
.post-preview-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--space-xs)}
.post-format,.post-export-actions,.post-slide-nav,.post-order,.post-suggestions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-xs)}
.post-bitmap{position:relative;margin:0;background:var(--color-paper-2);border:var(--rule-thin) solid var(--color-rule);min-height:280px;display:grid;place-items:center}
.post-bitmap img{display:block;width:100%;height:auto;max-height:68dvh;object-fit:contain;min-width:0}
.post-bitmap img[hidden],.post-bitmap p[hidden]{display:none}
.post-bitmap p{padding:var(--space-xl);color:var(--color-muted)}
.post-export-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.post-preview-panel .post-help,.post-preview-panel [data-status]{margin:0}
.post-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;white-space:nowrap;padding:var(--space-xs) var(--space-sm);border:var(--rule-thin) solid var(--color-ink);background:var(--color-paper);color:var(--color-ink);font-family:var(--font-post-body);font-size:var(--text-sm);font-weight:600;cursor:pointer;border-radius:var(--radius-input)}
.post-button:hover{background:var(--color-paper-2)}
.post-button:active{transform:translateY(1px)}
.post-button:focus-visible,.post-editor input:focus-visible,.post-editor textarea:focus-visible,.post-editor summary:focus-visible{outline:3px solid var(--color-focus);outline-offset:3px}
.post-button:disabled{cursor:default;color:var(--color-muted);border-color:var(--color-rule);background:var(--color-paper-2)}
.post-primary,.post-button[aria-pressed=true]{background:var(--color-accent-dark);color:var(--color-paper)}
.post-primary:hover,.post-button[aria-pressed=true]:hover{background:var(--color-ink)}
.post-controls{display:flex;flex-direction:column;gap:var(--space-sm);min-width:0}
.post-controls label{display:flex;flex-direction:column;gap:var(--space-2xs);font-weight:600;min-width:0}
.post-controls input[type=text],.post-controls textarea{width:100%;max-width:100%;font:inherit;font-weight:400;color:var(--color-ink);background:var(--color-paper);border:var(--rule-thin) solid var(--color-rule-2);border-radius:var(--radius-input);padding:var(--space-xs) var(--space-sm);resize:vertical}
.post-controls input[type=text]{min-height:44px}
.post-controls textarea{line-height:1.5}
.post-controls input[type=file]{width:100%;min-width:0;font:inherit;font-size:var(--text-sm)}
.post-controls input:disabled,.post-controls textarea:disabled{cursor:not-allowed;opacity:.55;color:var(--color-muted)}
.post-controls input[aria-invalid=true],.post-controls textarea[aria-invalid=true]{border-color:var(--color-error)}
@media(hover:hover){.post-controls input[type=text]:hover,.post-controls textarea:hover{background:var(--color-paper-2)}}
.post-controls input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;margin:5px 0 0;flex:0 0 18px;accent-color:var(--color-accent-dark)}
.post-controls .post-event-choice,.post-controls .post-rights{flex-direction:row;align-items:start;gap:var(--space-sm);min-height:44px;font-weight:400;line-height:1.5;padding-block:var(--space-xs)}
.post-controls .post-event-choice span,.post-controls .post-rights span{flex:1 1 0;min-width:0;overflow-wrap:anywhere}
/* Folded sections: a 44px summary row with a chevron that turns when open. */
.post-editor summary{display:flex;align-items:center;gap:var(--space-sm);min-height:44px;cursor:pointer;list-style:none;font-weight:600;min-width:0}
.post-editor summary::-webkit-details-marker{display:none}
.post-editor summary::after{content:'';flex:none;margin-left:auto;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform var(--dur-short) var(--ease-out)}
.post-editor details[open]>summary::after{transform:translateY(2px) rotate(-135deg)}
.post-count{font-size:var(--text-sm);font-weight:400;color:var(--color-muted);white-space:nowrap}
.post-selection{border:var(--rule-thin) solid var(--color-rule);padding:0 var(--space-md)}
.post-selection[open]{padding-bottom:var(--space-sm)}
.post-selection .post-help{margin-top:0}
.post-selection [data-selection]{max-height:240px;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));column-gap:var(--space-md)}
.post-events{display:flex;flex-direction:column;gap:var(--space-2xs)}
.post-section-title{font-size:var(--text-sm);font-weight:700;line-height:1.3;margin:0}
.post-event-editor{border-top:var(--rule-thin) solid var(--color-rule)}
.post-event-editor:last-child{border-bottom:var(--rule-thin) solid var(--color-rule)}
.post-event-number{flex:none;min-width:1.5em;color:var(--color-accent-dark);font-variant-numeric:tabular-nums}
.post-event-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.post-event-body{display:flex;flex-direction:column;gap:var(--space-sm);padding:0 0 var(--space-md) calc(1.5em + var(--space-sm))}
.post-photo>summary{min-height:44px;font-size:var(--text-sm)}
.post-photo[open]{display:flex;flex-direction:column;gap:var(--space-xs)}
.post-photo .post-button{align-self:start}
.post-caption{display:flex;flex-direction:column;gap:var(--space-2xs)}
.post-caption-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm)}
.post-field-title{font-weight:600}
.post-help{font-size:var(--text-sm);font-weight:400;line-height:1.6;color:var(--color-muted);margin:var(--space-xs) 0;word-break:keep-all;overflow-wrap:anywhere}
.post-suggestions .post-button{min-height:36px;font-size:var(--text-xs);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;justify-content:flex-start;line-height:1.5}
.post-publication{border-top:var(--rule-strong) solid var(--color-ink);padding-top:var(--space-lg)}
.post-editor [data-status]{font-size:var(--text-sm);line-height:1.6;min-height:1.6em;overflow-wrap:anywhere}
.post-editor[data-state=error] [data-status]{color:var(--color-error)}
.post-editor[data-state=loading] .post-bitmap{opacity:.7}
.post-editor[data-state=success] [data-status]{color:var(--color-accent-dark)}
/* Wider screens: the dialog fills the screen, the preview fits its pane and only the controls scroll. */
@media(min-width:769px){
.social-post-dialog{height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);overflow:hidden}
.social-post-dialog[open]{display:flex;flex-direction:column}
.social-post-dialog .post-editor-header{flex:none}
.social-post-dialog .post-workbench{flex:1 1 auto;min-height:0}
.social-post-dialog .post-preview-panel{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.social-post-dialog .post-bitmap{flex:1 1 0;min-height:220px}
.social-post-dialog .post-bitmap img{position:absolute;inset:0;margin:auto;width:auto;height:auto;max-width:100%;max-height:100%}
.social-post-dialog .post-controls{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:var(--space-sm)}
}
@media(max-width:768px){.social-post-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:var(--space-md)}.post-editor h2{font-size:var(--text-md)}.post-suggestions .post-button{min-height:44px}.post-workbench{grid-template-columns:minmax(0,1fr);gap:var(--space-lg)}.post-bitmap{min-height:200px}.post-bitmap img{max-height:55dvh}.post-export-actions .post-button{padding-inline:var(--space-xs);font-size:var(--text-xs)}.post-suggestions{flex-direction:column;align-items:stretch}}
@media(prefers-reduced-motion:reduce){.post-button:active{transform:none}.post-editor summary::after{transition:none}}
