:root {
  --ink: #292722;
  --muted: #77736b;
  --line: #dedbd3;
  --paper: #f7f5ef;
  --panel: #fffefa;
  --accent: #6657d9;
  --accent-soft: #efedff;
  --shadow: 0 18px 50px rgba(42, 37, 29, .08);
}
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { margin: 0; min-width: 1060px; color: var(--ink); background: var(--paper); font-family: Pretendard, "Noto Sans KR", system-ui, sans-serif; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.app-header { height: 88px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255, 254, 250, .94); }
.app-header h1 { margin: 1px 0 0; font-size: 24px; letter-spacing: -.04em; }
.eyebrow { margin: 0; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.project-state { min-width: 142px; display: grid; grid-template-columns: 10px auto; align-items: center; column-gap: 7px; color: var(--muted); font-size: 12px; }
.project-state small { grid-column: 2; color: #969087; font-size: 9px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #56a66f; box-shadow: 0 0 0 4px #e3f2e7; }
.project-state.saving .status-dot { background: #d6a33d; box-shadow: 0 0 0 4px #f7ecd2; }
.project-state.error .status-dot { background: #c95d5d; box-shadow: 0 0 0 4px #f8dddd; }
.header-button { min-height: 34px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; color: #5d5850; background: #fff; font-size: 11px; font-weight: 750; cursor: pointer; transition: .18s ease; }
.header-button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.workspace { height: calc(100vh - 88px); min-height: 0; display: grid; grid-template-columns:minmax(240px,1fr) 8px minmax(400px,1.7fr) 8px minmax(220px,.85fr); overflow: hidden; }
.panel { padding: 26px; min-width: 0; min-height: 0; overflow: hidden; }
.panel-resizer { position:relative; z-index:4; width:8px; height:100%; cursor:col-resize; touch-action:none; background:#e7e3da; outline:none; transition:background .15s ease; }
.panel-resizer::before { content:""; position:absolute; inset:0 -3px; }
.panel-resizer i { position:absolute; top:50%; left:50%; width:2px; height:42px; border-radius:2px; background:#b8b1a5; transform:translate(-50%,-50%); transition:.15s ease; }
.panel-resizer:hover,.panel-resizer:focus-visible,.panel-resizer.active { background:#ded8cc; }
.panel-resizer:hover i,.panel-resizer:focus-visible i,.panel-resizer.active i { width:3px; height:54px; background:var(--accent); }
body.resizing-panels,body.resizing-panels * { cursor:col-resize!important; user-select:none!important; }
body.resizing-panels iframe { pointer-events:none!important; }
.panel-heading { min-height: 40px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; }
.panel-heading > div { display: flex; align-items: center; gap: 9px; }
.panel-heading .preview-heading-tools { margin-left: auto; justify-content: flex-end; gap: 7px; }
.panel-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.025em; }
.step { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 800; }
.muted { color: var(--muted); font-size: 12px; }
.file-button, .primary-button, .secondary-button, .ghost-button { display: flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 9px; border: 1px solid transparent; font-weight: 700; font-size: 13px; cursor: pointer; transition: .18s ease; }
.file-button { margin-bottom: 12px; border: 1px dashed #a6a099; background: #fff; }
.file-button:hover, .secondary-button:hover { border-color: var(--accent); color: var(--accent); }
#sourceText { width: 100%; height: calc(100vh - 480px); min-height: 215px; resize: vertical; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); line-height: 1.65; outline: none; }
#sourceText.source-textarea-fallback { display:none; }
#sourceEditor { width:100%; height:calc(100vh - 480px); min-height:215px; overflow:hidden; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); line-height:1.65; }
#sourceEditor:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
#sourceEditor .cm-editor { height:100%; background:#fff; font:inherit; }
#sourceEditor .cm-scroller { overflow:auto; font-family:inherit; line-height:1.65; }
#sourceEditor .cm-content { padding:15px 8px; caret-color:var(--ink); }
#sourceEditor .cm-line { padding:0 7px; }
#sourceEditor .cm-gutters { border-right:1px solid #ece9e2; color:#9a958d; background:#faf9f5; }
#sourceEditor .cm-activeLine { background:transparent; }
#sourceEditor .cm-activeLineGutter { color:var(--accent); background:#f5f3ff; }
#sourceEditor .cm-selectionBackground { background:#c9c1ff!important; }
#sourceEditor .cm-editor.cm-focused { outline:none; }
#sourceEditor .cm-editor.source-jump { animation:source-jump-flash .9s ease; }
@keyframes source-jump-flash { 0%, 100% { background: #fff; } 35% { background: #f0edff; } }
.text-format-toolbar { margin:0 0 9px; padding:6px; display:grid; grid-template-columns:30px 30px 30px 38px repeat(4,30px) minmax(78px,120px) 30px 30px; justify-content:start; gap:5px; border:1px solid var(--line); border-radius:9px; background:#f1efe9; }
.format-button,.format-color-button,.format-size-select { width:30px; height:30px; min-width:30px; padding:0; border:1px solid #d4d0c7; border-radius:6px; color:#5d5850; background:#fff; font-size:11px; cursor:pointer; }
.format-button:hover,.format-color-button:hover,.format-size-select:hover { border-color:var(--accent); color:var(--accent); }
.format-bold { font-weight:900; }.format-italic { font-family:Georgia,serif; font-style:italic; }
.format-color-button { position:relative; display:grid; place-items:center; overflow:hidden; font-weight:800; text-decoration:underline 3px var(--format-color,#6657d9); text-underline-offset:3px; }
.format-color-button input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.format-color-apply { width:38px;height:30px;padding:0;border:1px solid var(--accent);border-radius:6px;color:var(--accent);background:var(--accent-soft);font-size:9px;font-weight:800;cursor:pointer; }
.format-color-apply:hover { color:#fff;background:var(--accent); }
.format-size-select { appearance:none; outline:none; font-size:10px; font-weight:800; text-align:center; text-align-last:center; }
.source-find-control { min-width:0;height:30px;display:flex;align-items:center;overflow:hidden;border:1px solid #d4d0c7;border-radius:6px;background:#fff;box-sizing:border-box; }
.source-find-control:focus-within { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); }
.source-find-control input { width:100%;height:28px;padding:0 8px;border:0;outline:0;color:#5d5850;background:transparent;font-size:10px;font-weight:700;box-sizing:border-box; }
.source-find-control input::placeholder { color:#aaa49a; }
.source-find-button { font-size:13px;font-weight:900; }
.align-button { display:grid; place-items:center; line-height:1; }
.align-glyph { width:15px; height:12px; display:flex; flex-direction:column; justify-content:space-between; }
.align-glyph i { display:block; height:1px; background:currentColor; }
.align-glyph i:nth-child(1),.align-glyph i:nth-child(3) { width:15px; }.align-glyph i:nth-child(2) { width:10px; }.align-glyph i:nth-child(4) { width:8px; }.align-glyph i:nth-child(5) { width:13px; }
.align-left .align-glyph { align-items:flex-start; }.align-center .align-glyph { align-items:center; }.align-right .align-glyph { align-items:flex-end; }
.control-group { margin-top: 17px; }
.control-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: #ebe8e0; }
.secondary-button { width: 100%; margin-top: 10px; border-color: var(--line); background: #fff; }
.source-style-row { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.source-style-row .secondary-button { min-width:0; }
.source-action-row { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.source-action-row .secondary-button { min-width:0; }
.switch-row { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.switch-row span { display: grid; gap: 2px; }
.switch-row strong { font-size: 13px; }
.switch-row small { color: var(--muted); font-size: 10px; }
.switch-row input { position: absolute; opacity: 0; }
.switch-row i { position: relative; flex: 0 0 auto; width: 42px; height: 24px; border-radius: 20px; background: #ccc7be; transition: .2s; }
.switch-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: .2s; box-shadow: 0 2px 5px #0002; }
.switch-row input:checked + i { background: var(--accent); }
.switch-row input:checked + i::after { transform: translateX(18px); }
.preview-panel { background: #efede7; }
.preview-options { margin: -2px 0 16px; display: flex; gap: 9px; }
.preview-options label { padding: 8px 10px; border: 1px solid #d5d1c8; border-radius: 8px; background: #faf9f5; font-size: 11px; cursor: pointer; }
.preview-options input { accent-color: var(--accent); }
.preview-tool-button { padding: 8px 12px; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 800; cursor: pointer; }
.large-preview-button { color: #fff; background: var(--accent); }
.large-preview-button:disabled { color: #77736b; border-color: #cbc7bd; background: #e4e1d9; cursor: default; }
.large-mode-state { padding: 8px 9px; border-radius: 8px; color: #956b20; background: #fff2d6; font-size: 10px; font-weight: 800; white-space: nowrap; }
.reader-shell { height: calc(100vh - 202px); min-height: 0; padding: 24px; border-radius: 14px; background: #dcd8cf; box-shadow: inset 0 1px 5px #0000000d; }
#previewFrame { display: block; width: 100%; height: 100%; border: 0; border-radius: 4px; background: #fff; box-shadow: var(--shadow); }
.export-panel { display: flex; flex-direction: column; background: var(--panel); }
.book-summary { margin: 26px 0 22px; padding: 15px 0; display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.book-mark { display: grid; place-items: center; width: 38px; height: 48px; border-radius: 3px 7px 7px 3px; color: #fff; background: var(--accent); font-family: Georgia, serif; font-size: 19px; box-shadow: inset 4px 0 #0002; }
.summary-cover { width: 38px; height: 48px; border-radius: 3px; object-fit: cover; box-shadow: 0 3px 9px #0002; }
.summary-cover[hidden] { display: none; }
.book-summary div:last-child { display: grid; gap: 4px; min-width: 0; }
.book-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.book-summary span { color: var(--muted); font-size: 11px; }
.validation-box { display: grid; gap: 12px; padding: 14px; border-radius: 10px; color: #5d5a53; background: #f3f1eb; font-size: 11px; line-height: 1.4; }
.check { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 5px; border-radius: 50%; color: #fff; background: #65a878; font-size: 10px; }
.validation-box .warning { color: #956b20; }
.validation-box .warning .check { background: #d7a33e; }
.primary-button { color: white; background: var(--accent); }
.primary-button:hover { background: #5647ca; transform: translateY(-1px); box-shadow: 0 8px 20px #6657d930; }
#exportButton { width: 100%; margin-top: auto; min-height: 48px; }
.export-note { margin: 10px 5px 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.modal { width: min(760px, calc(100vw - 40px)); padding: 0; border: 0; border-radius: 16px; background: var(--panel); box-shadow: 0 30px 90px #17130d40; }
.modal::backdrop { background: #27231c88; backdrop-filter: blur(3px); }
.modal form { padding: 25px; }
.small-modal { width: min(510px, calc(100vw - 40px)); }
#tocModal { width:min(620px,calc(100vw - 40px)); }
#tocModal form { max-height:calc(100vh - 48px); overflow:auto; box-sizing:border-box; }
.font-picker { min-height:64px; margin-top:18px; padding:12px 14px; display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px dashed var(--accent); border-radius:10px; color:var(--accent); background:#faf9ff; cursor:pointer; }
.font-picker strong { font-size:13px; }.font-picker small { color:var(--muted); font-size:10px; }
.font-list { max-height:260px; margin-top:14px; display:grid; gap:8px; overflow:auto; }
.font-item { padding:10px 11px; display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:8px; border:1px solid var(--line); border-radius:9px; background:#faf9f5; }
.font-item span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.font-item button { min-height:30px; padding:0 9px; border:1px solid #e1bcbc; border-radius:7px; color:#aa4f4f; background:#fff; font-size:10px; cursor:pointer; }
.font-item .font-apply-button { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); font-weight:800; }
.font-empty { margin:0; padding:24px; border:1px dashed var(--line); border-radius:9px; color:var(--muted); font-size:11px; text-align:center; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; }
.modal h3 { margin: 3px 0 0; font-size: 20px; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 50%; color: var(--muted); background: #f0eee8; font-size: 22px; cursor: pointer; }
.modal-description { color: var(--muted); font-size: 12px; line-height: 1.6; }
.code-editor { width: 100%; height: 380px; padding: 16px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; color: #332f2a; background: #f5f3ed; font: 12px/1.6 Consolas, monospace; outline: none; tab-size: 2; }
.font-details { margin-top: 12px; color: var(--muted); font-size: 12px; }
.font-details summary { cursor: pointer; font-weight: 700; }
.font-details label { margin-top: 10px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.modal-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 9px; }
.modal-actions button { min-width: 92px; padding: 0 18px; }
.modal-actions .primary-button,.modal-actions .secondary-button,.modal-actions .ghost-button { width:auto; height:42px; min-height:42px; margin-top:0; }
.toc-chapter-actions { margin-top: 12px; margin-bottom: 4px; }
.ghost-button { border-color: var(--line); background: transparent; }
.form-grid { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.field input, .field select { width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; outline: none; }
.toc-design-section { margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.toc-design-section h4 { margin:0 0 12px; color:var(--ink); font-size:13px; }
.toc-design-grid { display:grid; grid-template-columns:1fr 1fr; gap:11px; }
.toc-design-wide { grid-column:1/-1; }
.toc-design-grid input[type="color"] { padding:4px 6px; cursor:pointer; }
.toc-item-labels { margin-top:14px; display:grid; gap:8px; color:var(--muted); font-size:11px; font-weight:700; }
#tocItemEditor { display:grid; gap:7px; }
.toc-item-label-row { display:grid; grid-template-columns:minmax(0,1fr) 72px minmax(0,1.2fr); align-items:center; gap:8px; }
.toc-item-label-row span { overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.toc-item-label-row input { width:100%; height:36px; padding:0 10px; border:1px solid var(--line); border-radius:7px; box-sizing:border-box; color:var(--ink); background:#fff; outline:none; }
.toc-item-label-row .toc-prefix-input { text-align:center; }
.toc-design-preview { min-height:150px; max-height:300px; margin-top:13px; padding:2em; display:block; border:1px solid var(--line); border-radius:9px; box-sizing:border-box; overflow:auto; }
.toc-design-preview h1 { display:block; margin:0 0 1.4em; color:inherit; font-size:2em; text-align:inherit; }
.toc-design-preview ol { margin:0; padding:0; list-style:none; }
.toc-design-preview li { color:inherit; }
.cover-field { grid-column: 1 / -1; }
.cover-picker { min-height: 58px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; border: 1px dashed #aaa49a; border-radius: 9px; color: var(--ink); background: #faf9f5; cursor: pointer; }
.cover-picker:hover { border-color: var(--accent); color: var(--accent); }
.cover-picker strong { font-size: 12px; }
.cover-picker small { color: var(--muted); font-size: 9px; }
.cover-preview { padding: 9px; display: grid; grid-template-columns: 48px 1fr 32px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; background: #f5f3ed; }
.cover-preview[hidden] { display: none; }
.cover-preview img { width: 48px; height: 62px; border-radius: 4px; object-fit: cover; background: #ddd; box-shadow: 0 3px 9px #0002; }
.cover-preview > div { min-width: 0; display: grid; gap: 3px; }
.cover-preview strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cover-preview small { color: var(--muted); font-size: 9px; }
.cover-preview .icon-button { width: 28px; height: 28px; font-size: 18px; }
.small-modal > form > .field { margin-top: 14px; }
.color-actions { display: grid; grid-template-columns: auto 1fr auto auto; }
.css-insert-modal { width:min(1220px,calc(100vw - 28px)); height:min(840px,calc(100vh - 28px)); max-width:none; }
.css-insert-modal>form { height:100%; padding:0; display:flex; flex-direction:column; overflow:hidden; }
.css-insert-header { flex:0 0 auto; padding:19px 23px 15px; border-bottom:1px solid var(--line); }
.css-insert-header .modal-description { margin:6px 0 0; }
.css-insert-workspace { flex:1; min-height:0; display:grid; grid-template-columns:28% 30% 42%; background:#f3f1eb; }
.css-insert-workspace>section { min-width:0; padding:18px; overflow:auto; border-right:1px solid var(--line); }
.css-insert-workspace>section:last-child { border-right:0; background:#fff; }
.css-insert-section-title { margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.css-insert-section-title span { display:grid; place-items:center; width:23px; height:23px; border-radius:50%; color:var(--accent); background:var(--accent-soft); font-size:9px; font-weight:800; }
.css-insert-section-title h4 { margin:0; font-size:13px; }
#cssInsertOriginal { width:100%; height:calc(100% - 60px); min-height:320px; padding:13px; resize:none; border:1px solid var(--line); border-radius:9px; background:#fff; font:11px/1.65 Consolas,monospace; outline:none; }
#cssInsertSelectionInfo { display:block; margin-top:7px; color:var(--muted); font-size:9px; }
.css-insert-editor>.field { margin-bottom:13px; }
.css-insert-fields { display:grid; gap:11px; }
.css-insert-fields .field textarea { width:100%; min-height:82px; padding:10px 11px; resize:vertical; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:#fff; outline:none; font-size:11px; line-height:1.55; }
.css-insert-fields .field input { height:38px; }
.css-insert-fields .field input[type="color"] { padding:3px 5px; cursor:pointer; }
.css-image-select { display:grid; gap:8px; }
.css-image-select-row { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:center; }
.css-image-selected-name { min-width:0; height:38px; padding:10px 11px; overflow:hidden; border:1px solid var(--line); border-radius:8px; color:var(--muted); background:#fff; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.css-image-select-button { min-height:38px; padding:0 12px; font-size:10px; }
.css-image-selected-preview { display:grid; grid-template-columns:72px 1fr; gap:9px; align-items:center; padding:8px; border:1px solid var(--line); border-radius:9px; background:#faf9f5; }
.css-image-selected-preview img { width:72px; height:52px; object-fit:contain; border-radius:6px; background:#e9e6df; }
.css-image-selected-preview span { min-width:0; display:grid; gap:2px; color:var(--muted); font-size:9px; }
.css-image-selected-preview strong { overflow:hidden; color:var(--ink); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.css-image-picker-modal { width:min(880px,calc(100vw - 36px)); max-width:none; }
.css-image-picker-modal>form { max-height:min(720px,calc(100vh - 36px)); padding:0; display:flex; flex-direction:column; overflow:hidden; }
.css-image-picker-header { padding:20px 24px 16px; border-bottom:1px solid var(--line); }
.css-image-picker-gallery { min-height:260px; padding:20px; overflow:auto; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; background:#fff; }
.css-image-picker-empty { grid-column:1/-1; align-self:center; margin:0; padding:70px 20px; color:var(--muted); text-align:center; font-size:12px; }
.css-image-picker-card { min-width:0; padding:0; overflow:hidden; border:2px solid transparent; border-radius:10px; background:#f4f2ec; cursor:pointer; text-align:left; }
.css-image-picker-card.selected { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.css-image-picker-card img { display:block; width:100%; height:118px; object-fit:contain; background:#e9e6df; }
.css-image-picker-card span { padding:8px 9px; display:grid; gap:2px; }
.css-image-picker-card strong { overflow:hidden; color:var(--ink); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.css-image-picker-card small { color:var(--muted); font-size:9px; }
.css-image-picker-actions { flex:0 0 auto; padding:13px 20px; border-top:1px solid var(--line); background:#fffefa; }
.personal-sns-comment-editor { padding-top:4px; display:grid; gap:9px; }
.personal-sns-comment-editor-title { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:11px; }
.personal-sns-comment-editor-title .secondary-button { width:auto; min-height:32px; margin:0; padding:0 11px; font-size:10px; }
.personal-sns-comment-edit-list { display:grid; gap:8px; }
.personal-sns-comment-edit-row { padding:9px; display:grid; grid-template-columns:minmax(82px,.7fr) minmax(130px,1.6fr) auto; gap:7px; align-items:start; border:1px solid var(--line); border-radius:9px; background:#faf9f5; }
.personal-sns-comment-edit-row input,.personal-sns-comment-edit-row textarea { width:100%; min-width:0; padding:8px 9px; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:#fff; font-size:10px; outline:none; }
.personal-sns-comment-edit-row input { height:36px; }.personal-sns-comment-edit-row textarea { height:54px; resize:vertical; }
.personal-sns-comment-remove { min-width:48px; min-height:36px; padding:0 9px; color:#b54d4d; font-size:10px; }
.personal-sns-comment-edit-empty { margin:0; padding:14px; border:1px dashed var(--line); border-radius:8px; color:var(--muted); font-size:10px; text-align:center; }
.keitai-mail-editor { padding-top:4px; display:grid; gap:9px; }
.keitai-mail-editor-title { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:11px; }
.keitai-mail-editor-title .secondary-button { width:auto; min-height:32px; margin:0; padding:0 11px; font-size:10px; }
.keitai-mail-edit-list { display:grid; gap:9px; }
.keitai-mail-edit-row { padding:10px; display:grid; grid-template-columns:1fr 1fr; gap:7px; border:1px solid var(--line); border-radius:9px; background:#faf9f5; }
.keitai-mail-edit-head { grid-column:1/-1; display:grid; grid-template-columns:1fr 88px auto; align-items:center; gap:7px; color:var(--muted); font-size:10px; }
.keitai-mail-edit-row input,.keitai-mail-edit-row select,.keitai-mail-edit-row textarea { width:100%; min-width:0; padding:8px 9px; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:#fff; font-size:10px; outline:none; }
.keitai-mail-edit-row input,.keitai-mail-edit-row select { height:36px; }.keitai-mail-edit-row textarea { grid-column:1/-1; min-height:66px; resize:vertical; }
.keitai-mail-remove { min-width:48px; min-height:34px; padding:0 9px; color:#b54d4d; font-size:10px; }
.keitai-mail-edit-empty { margin:0; padding:14px; border:1px dashed var(--line); border-radius:8px; color:var(--muted); font-size:10px; text-align:center; }
.thread-sns-post-editor { padding-top:4px; display:grid; gap:9px; }
.thread-sns-post-editor-title { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:11px; }
.thread-sns-post-editor-title .secondary-button { width:auto; min-height:32px; margin:0; padding:0 11px; font-size:10px; }
.thread-sns-post-edit-list { display:grid; gap:9px; }
.thread-sns-edit-row { padding:10px; display:grid; grid-template-columns:1fr 1fr; gap:7px; border:1px solid var(--line); border-radius:9px; background:#faf9f5; }
.thread-sns-post-edit-head { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:7px; color:var(--muted); font-size:10px; }
.thread-sns-edit-row input,.thread-sns-edit-row textarea { width:100%; min-width:0; padding:8px 9px; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:#fff; font-size:10px; outline:none; }
.thread-sns-edit-row input { height:36px; }
.thread-sns-edit-row textarea { grid-column:1/-1; min-height:78px; resize:vertical; line-height:1.55; }
.thread-sns-post-count-grid { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.thread-sns-post-count-grid label { display:grid; gap:4px; color:var(--muted); font-size:9px; }
.thread-sns-post-count-grid input { height:32px; }
.thread-sns-post-remove { min-width:48px; min-height:34px; padding:0 9px; color:#b54d4d; font-size:10px; }
.thread-sns-post-remove:disabled { color:var(--muted); opacity:.45; cursor:not-allowed; }
#cssInsertPreview { width:100%; height:calc(100% - 105px); min-height:360px; border:1px solid var(--line); border-radius:9px; background:#eceae4; }
.css-insert-result details { margin-top:9px; color:var(--muted); font-size:10px; }
.css-insert-result details summary { cursor:pointer; font-weight:700; }
#cssInsertXhtml { height:190px; margin-top:8px; font-size:10px; }
.css-insert-footer { flex:0 0 66px; padding:12px 20px; display:flex; align-items:center; justify-content:space-between; gap:15px; border-top:1px solid var(--line); background:#fffefa; }
.css-insert-footer>span { color:var(--muted); font-size:10px; }
.css-insert-footer>div { display:flex; gap:8px; }
.css-insert-footer button { min-width:105px; padding:0 16px; }
.image-modal { width: min(1080px, calc(100vw - 32px)); height: min(760px, calc(100vh - 32px)); max-width: none; }
.image-modal > form { position: relative; height: 100%; padding: 0; overflow: hidden; }
.image-modal-header { height: 82px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.image-workspace { height: calc(100% - 82px); display: grid; grid-template-columns: 30% 70%; }
.image-settings-panel { padding: 22px; overflow-y: auto; border-right: 1px solid var(--line); background: #f7f5ef; }
.image-settings-panel .field { margin-top: 14px; }
.image-file-picker { min-height: 46px; display: grid; place-items: center; border: 1px dashed var(--accent); border-radius: 9px; color: var(--accent); background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.image-info { margin-top: 14px; padding: 11px; display: flex; justify-content: space-between; border-radius: 8px; background: #fff; font-size: 11px; }
.image-info span { color: var(--muted); }
.image-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; }
.image-actions button { min-width: 0; min-height: 38px; padding: 0 8px; }
.danger-button { color: #b54d4d; }
.image-gallery-panel { min-width: 0; padding: 22px; overflow-y: auto; background: #fff; }
.image-gallery-heading { display: flex; justify-content: space-between; align-items: center; }
.image-gallery-heading h4 { margin: 0; font-size: 14px; }
.image-gallery-heading span { color: var(--muted); font-size: 11px; }
.image-gallery { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.image-empty { grid-column: 1 / -1; padding: 70px 20px; color: var(--muted); text-align: center; font-size: 12px; }
.image-thumb { padding: 0; border: 2px solid transparent; border-radius: 10px; background: #f4f2ec; overflow: hidden; cursor: zoom-in; text-align: left; }
.image-thumb.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.image-thumb img { display: block; width: 100%; height: 180px; object-fit: contain; background: #e9e6df; }
.image-thumb span { padding: 10px 11px; display: grid; gap: 3px; }
.image-thumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.image-thumb small { color: var(--muted); font-size: 9px; }
.image-lightbox { position: absolute; inset: 0; z-index: 30; padding: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(20,18,15,.9); }
.image-lightbox[hidden] { display: none; }
.image-lightbox .icon-button { position: absolute; top: 18px; right: 18px; }
.image-lightbox img { max-width: 90%; max-height: 78%; object-fit: contain; box-shadow: 0 16px 50px #0008; }
.image-lightbox strong { color: #fff; font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 2147483647; padding: 11px 17px; border-radius: 9px; color: #fff; background: #292722; font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .22s; box-shadow: 0 8px 30px #0003; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.tutorial-overlay { position: fixed; inset: 0; z-index: 2147483600; background: rgba(20, 17, 13, .62); }
.tutorial-overlay[hidden] { display: none; }
.tutorial-spotlight { position: fixed; border: 3px solid #fff7d6; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(20,17,13,.62), 0 0 0 8px rgba(255,247,214,.18), 0 18px 60px #0007; pointer-events: none; transition: left .22s ease, top .22s ease, width .22s ease, height .22s ease; }
.tutorial-card { position: fixed; z-index: 2147483601; width: min(360px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 20px; display: flex; flex-direction: column; border: 1px solid #e5d5bd; border-radius: 18px; background: #fffaf3; box-shadow: 0 24px 90px #0006; transition: left .22s ease, top .22s ease; overflow: hidden; }
.tutorial-card h3 { margin: 0 0 8px; font-size: 20px; color: #2a2219; }
.tutorial-card p:not(.eyebrow) { margin: 0; color: #74685a; line-height: 1.65; font-size: 13px; white-space: pre-line; overflow-y: auto; padding-right: 4px; }
.tutorial-actions { flex: 0 0 auto; display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 12px; border-top: 1px solid #eadbc7; background: #fffaf3; }
.tutorial-actions button { width: auto; min-width: 70px; height: 38px; margin: 0; padding: 0 14px; }
.tutorial-target-active { position: relative !important; z-index: 2147483602 !important; border-radius: 14px; }
.project-state.tutorial-target-active { padding: 8px 10px; margin: -8px -10px; border: 1px solid #fff7d6; background: #fffaf3; box-shadow: 0 12px 35px #0004; }
@media (max-width: 1180px) { .panel { padding: 20px; } .workspace { grid-template-columns: 280px minmax(460px, 1fr) 250px; } }
