/* tiptap-editor.css — admin.css 자동 추출 (extract-editor-css.py v3).
 * 포함: .editor-shell, .editor-source, .tp-host, .ProseMirror, .se-
 * 제외: .hero-editor-, .he-
 * 생성일: 2026-04-23 (v3 — CSS 변수 scope prepend).
 * 원본: css/admin.css.
 * 사용처: 공개 게시판(skin/.../default/{write,reply,edit}.html) 에서만 로드.
 *        관리자(admin/*, blog/admin/*) 는 이미 admin.css 가 editor CSS + :root 보유.
 * 갱신: python3 /home/novasb/.../editor/tools/extract-editor-css.py
 *
 * CSS 변수 스코프: `:root` 전역 대신 에디터 컨테이너에 한정해 공개 레이아웃의
 *   동일 이름 변수(--text-muted 등)와 충돌하지 않도록.
 */

.editor-shell,
.editor-source,
.tp-host,
.se-shell,
.ProseMirror {
    --accent: #18181b;
    --accent-soft: #ebe5dc;
    --focus: #2563eb;
    --focus-ring: rgba(37, 99, 235, 0.16);
    --line: #e4ddd1;
    --line-strong: #d4cbbe;
    --shadow-md: 0 18px 48px rgba(17, 17, 17, 0.06);
    --surface-muted: #f7f7f7;
    --text: #151515;
    --text-muted: #8b8378;
    --text-soft: #5e574e;
}

.editor-source {
    display: grid;
    gap: 10px;
}

.editor-source label {
    margin-bottom: 0;
}

.editor-source.is-hidden,
.editor-shell[hidden] {
    display: none;
}

.tp-host {
    margin-top: 8px;
}

.se-shell {
    /* [2026-04-25] 외곽 그림자 제거 — NovaSite 폼 디자인은 그림자 없는 회색톤 통일.
       기존: box-shadow: var(--shadow-md); border-radius: 24px;
       변경: 그림자 제거 + radius 4px (다른 input 과 통일). */
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: none;
}

.se-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid var(--line);
    border-radius: 24px 24px 0 0;
}

.se-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
}

.se-btn:hover {
    background: var(--surface-muted);
    color: var(--text);
}

.se-btn.is-active {
    background: var(--accent-soft);
    border-color: var(--line);
    color: var(--text);
}

.se-add-label {
    font-size: 13px;
    font-weight: 600;
}

.se-sep {
    width: 1px;
    height: 20px;
    background: var(--line);
    margin: 0 2px;
    flex-shrink: 0;
    align-self: center;
}

.se-heading-wrap {
    position: relative;
}

.se-heading-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    font: 600 13px/1 inherit;
}

.se-heading-btn:hover {
    background: var(--surface-muted);
    color: var(--text);
}

.se-heading-btn.is-open {
    background: var(--accent-soft);
    border-color: var(--line);
    color: var(--text);
}

.se-heading-label {
    min-width: 22px;
    text-align: center;
}

.se-heading-drop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 400;
    min-width: 150px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 34px rgba(17, 17, 17, 0.1);
}

.se-heading-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 10px;
    background: none;
    cursor: pointer;
    color: var(--text-soft);
    font: inherit;
    font-size: 14px;
    text-align: left;
}

.se-heading-item:hover {
    background: var(--surface-muted);
    color: var(--text);
}

.se-heading-item.is-active {
    background: var(--accent-soft);
    color: var(--text);
    font-weight: 600;
}

.se-font-btn {
    padding: 0 8px;
    max-width: 160px;
}

.se-font-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
    font-weight: 400;
}

.se-font-drop {
    min-width: 190px;
}

.se-fontsize-btn {
    min-width: 52px;
    justify-content: space-between;
}

.se-fontsize-label {
    min-width: 20px;
    text-align: center;
}

.se-fontsize-drop {
    min-width: 100px;
}

.se-fontsize-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 7px 12px;
    border: none;
    border-radius: 10px;
    background: none;
    color: var(--text-soft);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
}

.se-fontsize-item:hover {
    background: var(--surface-muted);
    color: var(--text);
}

.se-fontsize-item.is-active {
    color: var(--accent, #1a6cff);
    font-weight: 600;
}

.se-fontsize-check {
    color: var(--accent, #1a6cff);
}

.se-sep-line {
    height: 1px;
    margin: 3px 0;
    background: var(--line);
}

.se-content-wrap {
    position: relative;
}

.se-content {
    display: block;
}

.se-content .ProseMirror {
    min-height: 420px;
    padding: 26px 28px 34px;
    outline: none;
    color: var(--text);
    font-size: 15px;
    line-height: 1.8;
}

.se-content .ProseMirror:focus {
    outline: none;
}

.se-placeholder {
    position: absolute;
    top: 26px;
    left: 28px;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 15px;
}

.se-content .ProseMirror > * + * {
    margin-top: 0.65em;
}

.se-content .ProseMirror p {
    margin: 0;
}

.se-content .ProseMirror h1,
.se-content .ProseMirror h2,
.se-content .ProseMirror h3,
.se-content .ProseMirror h4,
.se-content .ProseMirror h5,
.se-content .ProseMirror h6 {
    margin: 0;
    color: var(--text);
    line-height: 1.24;
    font-weight: 700;
}

.se-content .ProseMirror h1 {
    font-size: 2em;
}

.se-content .ProseMirror h2 {
    font-size: 1.5em;
}

.se-content .ProseMirror h3 {
    font-size: 1.25em;
}

.se-content .ProseMirror h4 {
    font-size: 1.1em;
}

.se-content .ProseMirror h5 {
    font-size: 1em;
}

.se-content .ProseMirror h6 {
    color: var(--text-muted);
    font-size: 0.9em;
}

.se-content .ProseMirror blockquote {
    margin: 0;
    padding: 10px 16px;
    border-left: 3px solid var(--text);
    border-radius: 0 8px 8px 0;
    color: var(--text-soft);
    background: transparent;
}

.se-content .ProseMirror a {
    color: #1d4ed8;
    text-decoration: underline;
}

.se-content .ProseMirror ul,
.se-content .ProseMirror ol {
    margin: 0;
    padding-left: 1.5em;
}

.se-content .ProseMirror li + li {
    margin-top: 0.2em;
}

.se-content .ProseMirror code {
    padding: 0.1em 0.4em;
    border-radius: 6px;
    background: var(--surface-muted);
    color: var(--text);
    font-family: "SFMono-Regular", "Cascadia Code", "Consolas", monospace;
    font-size: 0.875em;
}

.se-content .ProseMirror pre {
    margin: 0;
    padding: 16px 20px;
    border-radius: 16px;
    background: #171717;
    color: #f4f4f5;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.7;
}

.se-content .ProseMirror pre code {
    padding: 0;
    background: none;
    color: inherit;
    font-size: inherit;
}

.se-content .ProseMirror hr {
    margin: 0.6em 0;
    border: none;
    border-top: 1px solid var(--line);
}

.se-content .ProseMirror img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.se-content .ProseMirror img.align-left,
.se-content .ProseMirror img.align-right,
.se-content .ProseMirror img[style*="float"] {
    max-width: 50%;
}

.se-content .ProseMirror img.align-left {
    float: left;
    margin: 0 1em 0.5em 0;
}

.se-content .ProseMirror img.align-center {
    display: block;
    float: none;
    margin: 0 auto;
}

.se-content .ProseMirror img.align-right {
    float: right;
    margin: 0 0 0.5em 1em;
}

.se-content .ProseMirror img[style*="0 auto"] {
    display: block;
    float: none;
    margin: 0 auto;
}

.se-content .ProseMirror::after {
    content: "";
    display: table;
    clear: both;
}

.se-content .ProseMirror-selectednode {
    outline: 3px solid rgba(37, 99, 235, 0.4);
    border-radius: 12px;
}

.se-content .ProseMirror mark {
    padding: 0 2px;
    border-radius: 4px;
    background: #fef08a;
}

.se-content .ProseMirror ul[data-type="taskList"] {
    list-style: none;
    padding-left: 0;
}

.se-content .ProseMirror li[data-type="taskItem"] {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
}

.se-content .ProseMirror li[data-type="taskItem"] > label {
    display: inline-flex !important;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0;
    font-weight: normal !important;
}

.se-content .ProseMirror li[data-type="taskItem"] > label input {
    width: auto;
    margin: 0;
}

.se-content .ProseMirror li[data-type="taskItem"] > div {
    flex: 1;
    min-width: 0;
}

.se-content .ProseMirror li[data-type="taskItem"][data-checked="true"] > div {
    color: var(--text-muted);
    text-decoration: line-through;
}

.se-content .ProseMirror .tableWrapper {
    overflow-x: auto;
    margin: 0;
}

.se-content .ProseMirror table {
    width: 100%;
    border-collapse: collapse;
}

.se-content .ProseMirror th,
.se-content .ProseMirror td {
    min-width: 60px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    vertical-align: top;
}

.se-content .ProseMirror th {
    background: var(--surface-muted);
    font-weight: 600;
}

.se-content .ProseMirror .selectedCell {
    background: var(--accent-soft);
}

.se-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 17, 17, 0.42);
    backdrop-filter: blur(4px);
}

.se-modal {
    width: min(460px, calc(100vw - 32px));
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 22px 60px rgba(17, 17, 17, 0.22);
}

.se-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--line);
}

.se-modal-title {
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.se-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.se-modal-close:hover {
    background: var(--surface-muted);
    color: var(--text);
}

.se-modal-body {
    padding: 18px;
}

.se-modal-label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
}

.se-modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.se-modal-input:focus {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.se-modal-error {
    margin: 10px 0 0;
    color: #dc2626;
    font-size: 13px;
}

.se-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    background: var(--surface-muted);
}

.se-modal-btn-cancel {
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--text-soft);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
}

.se-modal-btn-cancel:hover {
    background: var(--surface-muted);
}

.se-modal-btn-ok {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    background: #d6d3d1;
    color: #8b8378;
    cursor: not-allowed;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
}

.se-modal-btn-ok.active {
    background: var(--accent);
    color: #ffffff;
    cursor: pointer;
}

.se-modal-btn-ok.active:hover {
    background: #0f0f10;
}

.se-task-item {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.se-task-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.se-task-content {
    flex: 1;
    min-width: 0;
}

.se-btn-with-swatch {
    gap: 2px;
}

.se-highlight-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 2px;
    background: #fef08a;
}

.se-highlight-palette {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 100;
    display: flex;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(17, 17, 17, 0.12);
}

.se-swatch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: #ffffff;
    color: var(--text-soft);
    cursor: pointer;
}

.se-swatch-btn.is-active {
    border: 2px solid var(--focus);
}

.se-swatch-btn.is-clear {
    color: #6b7280;
}

.se-highlight-indicator.is-yellow,
.se-swatch-btn.is-yellow {
    background: #fef08a;
}

.se-highlight-indicator.is-green,
.se-swatch-btn.is-green {
    background: #bbf7d0;
}

.se-highlight-indicator.is-blue,
.se-swatch-btn.is-blue {
    background: #bfdbfe;
}

.se-highlight-indicator.is-violet,
.se-swatch-btn.is-violet {
    background: #ddd6fe;
}

.se-highlight-indicator.is-red,
.se-swatch-btn.is-red {
    background: #fecaca;
}

.se-menu-icon {
    margin-right: 8px;
    flex-shrink: 0;
}

.se-modal-label-offset {
    margin-top: 12px;
}

.se-heading-drop-right {
    right: 0;
    left: auto;
    min-width: 130px;
}

.se-toolbar-spacer {
    flex: 1;
}

@media (max-width: 720px) {
.se-toolbar {
        padding: 8px 10px;
    }

.se-content .ProseMirror {
        min-height: 320px;
        padding: 18px 18px 24px;
    }

.se-placeholder {
        top: 18px;
        left: 18px;
    }
}

.se-shell {
    border-radius: 16px;
}

.se-toolbar {
    border-radius: 16px 16px 0 0;
}

.se-btn,
.se-heading-btn {
    height: 34px;
    border-radius: 10px;
    font-size: 12px;
}

.se-heading-drop {
    border-radius: 12px;
}

.se-heading-item {
    border-radius: 8px;
    font-size: 13px;
}

.se-content .ProseMirror {
    font-size: 14px;
}

.se-placeholder {
    font-size: 14px;
}

.se-content .ProseMirror pre {
    border-radius: 12px;
    font-size: 12px;
}

.se-content .ProseMirror-selectednode {
    border-radius: 10px;
}

.se-modal {
    border-radius: 16px;
}

.se-modal-close,
.se-modal-input,
.se-modal-btn-cancel,
.se-modal-btn-ok {
    border-radius: 8px;
}

.se-shell {
    border-radius: 12px;
}

.se-toolbar {
    border-radius: 12px 12px 0 0;
}

.se-btn,
.se-heading-btn {
    height: 32px;
    border-radius: 8px;
    font-size: 12px;
}

.se-heading-drop,
.se-modal {
    border-radius: 10px;
}

.se-heading-item,
.se-modal-close,
.se-modal-input,
.se-modal-btn-cancel,
.se-modal-btn-ok {
    border-radius: 8px;
}

.se-content .ProseMirror,
.se-placeholder {
    font-size: 14px;
}

.se-content .ProseMirror pre {
    border-radius: 10px;
    font-size: 12px;
}

.se-content .ProseMirror,
.se-content .ProseMirror p,
.se-content .ProseMirror li,
.se-content .ProseMirror blockquote,
.se-content .ProseMirror td,
.se-content .ProseMirror th,
.se-placeholder,
.editor-source textarea {
    font-size: 16px !important;
}

