.kdl-past-paper-editor{margin:18px 0 30px;border:1px solid #e8dcc8;border-radius:18px;background:#fffdf8;box-shadow:0 12px 30px rgba(31,41,55,.08);overflow:hidden;color:#202733}.kdl-past-paper-editor-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 18px;background:linear-gradient(135deg,#fff8dc,#fffdf7)}.kdl-past-paper-editor-head>div{display:flex;align-items:baseline;gap:10px;min-width:0}.kdl-past-paper-editor-head strong{font-size:16px}.kdl-past-paper-editor-head span{font-size:13px;color:#6d665a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kdl-past-paper-editor button{appearance:none;border:1px solid #d9cbb6;border-radius:10px;background:#fff;color:#252525;font:inherit;font-weight:800;padding:9px 13px;cursor:pointer}.kdl-past-paper-editor button:hover{border-color:#d29b00;background:#fff9e8}.kdl-past-paper-editor button.is-primary{background:#f6bf00;border-color:#e5ad00;color:#1e1e1e}.kdl-past-paper-editor button:disabled{opacity:.45;cursor:not-allowed}.kdl-past-paper-editor-panel{padding:16px 18px 20px;border-top:1px solid #eee3d3}.kdl-past-paper-editor-status-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.kdl-past-paper-editor-status-row>[data-editor-status]{font-size:14px;color:#5d6470}.kdl-past-paper-editor-status-row>[data-editor-status][data-state="saved"]{color:#08783f;font-weight:800}.kdl-past-paper-editor-status-row>[data-editor-status][data-state="error"]{color:#c62828;font-weight:800}.kdl-past-paper-editor-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.kdl-past-paper-editor-form{margin-top:18px;padding-top:18px;border-top:1px solid #eee3d3}.kdl-past-paper-editor-form label{display:flex;flex-direction:column;gap:7px}.kdl-past-paper-editor-form label>span,.kdl-past-paper-editor-answer legend{font-size:13px;font-weight:900;color:#373b43}.kdl-past-paper-editor-form textarea,.kdl-past-paper-editor-form input[type="text"]{width:100%;box-sizing:border-box;border:1px solid #d7d9de;border-radius:11px;background:#fff;padding:11px 12px;color:#20242a;font:inherit;line-height:1.55;resize:vertical}.kdl-past-paper-editor-form textarea:focus,.kdl-past-paper-editor-form input[type="text"]:focus{outline:3px solid rgba(246,191,0,.25);border-color:#e0ad00}.kdl-past-paper-editor-form>.is-wide+ .is-wide{margin-top:12px}.kdl-past-paper-editor-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.kdl-past-paper-editor-answer{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:15px 0 0;padding:12px 14px;border:1px solid #dedfe3;border-radius:12px}.kdl-past-paper-editor-answer legend{padding:0 6px}.kdl-past-paper-editor-answer label{display:inline-flex;flex-direction:row;align-items:center;gap:6px;padding:7px 10px;border-radius:9px;background:#f6f7f9;font-weight:800}.kdl-past-paper-editor-answer input{width:18px;height:18px;accent-color:#f0b800}.kdl-past-paper-editor-form>p{margin:13px 0 0;font-size:13px;color:#69707b}.kdl-cbt-question-card.is-admin-editing,.kdl-subject-question-card.is-admin-editing{outline:3px solid rgba(246,191,0,.45);outline-offset:3px}.kdl-past-paper-editor.is-editing{border-color:#e1ac00}.kdl-past-paper-editor.is-collapsed{box-shadow:none}@media(max-width:760px){.kdl-past-paper-editor-head,.kdl-past-paper-editor-status-row{align-items:stretch;flex-direction:column}.kdl-past-paper-editor-head button{align-self:flex-start}.kdl-past-paper-editor-actions{justify-content:flex-start}.kdl-past-paper-editor-choice-grid{grid-template-columns:1fr}.kdl-past-paper-editor-panel{padding:14px}.kdl-past-paper-editor-head{padding:14px}}

.kdl-past-paper-editor-form [data-editor-field="explanation"]{min-height:150px}

.kdl-past-paper-editor-explanation{margin-top:12px}.kdl-past-paper-editor-explanation-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:7px}.kdl-past-paper-editor-explanation-head>span{font-size:13px;font-weight:900;color:#373b43}.kdl-past-paper-editor-explanation-head small{font-size:12px;color:#727985}.kdl-past-paper-editor-format-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px;padding:9px 10px;border:1px solid #e2e4e8;border-radius:11px;background:#f8f9fb}.kdl-past-paper-editor-format-tools button{padding:7px 11px;background:#fff}.kdl-past-paper-editor-color{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:8px!important;padding:4px 8px;border:1px solid #d9dce2;border-radius:9px;background:#fff}.kdl-past-paper-editor-color>span{font-size:12px!important;font-weight:800!important;color:#424851!important}.kdl-past-paper-editor-color input[type="color"]{width:34px;height:28px;padding:2px;border:0;border-radius:6px;background:transparent;cursor:pointer}.kdl-past-paper-editor-color>[data-editor-color-preview]{display:block;width:18px;height:18px;flex:0 0 18px;border:1px solid rgba(0,0,0,.22);border-radius:4px;background:#414852}.kdl-past-paper-editor-color>[data-editor-color-value]{min-width:66px;color:#303640;font-family:Consolas,"SFMono-Regular",Menlo,monospace;font-size:12px;font-weight:800;letter-spacing:0}.kdl-past-paper-editor-richtext{min-height:160px;width:100%;box-sizing:border-box;border:1px solid #d7d9de;border-radius:11px;background:#fff;padding:12px;color:#414852;font:inherit;font-size:18px;line-height:1.7;white-space:pre-wrap;word-break:keep-all;overflow-wrap:anywhere}.kdl-past-paper-editor-richtext:focus{outline:3px solid rgba(246,191,0,.25);border-color:#e0ad00}.kdl-past-paper-editor-richtext:empty::before{content:attr(data-placeholder);color:#979da7;pointer-events:none}.kdl-past-paper-editor-richtext strong,.kdl-past-paper-editor-richtext b{font-weight:800;color:inherit!important}.kdl-past-paper-editor-richtext span{line-height:inherit}@media(max-width:760px){.kdl-past-paper-editor-explanation-head{align-items:flex-start;flex-direction:column;gap:3px}.kdl-past-paper-editor-format-tools{align-items:stretch}.kdl-past-paper-editor-format-tools button{min-height:38px}}
.kdl-past-paper-editor-format-tools button.is-text-color{display:inline-flex;align-items:center;gap:7px}.kdl-past-paper-editor-format-tools button.is-text-color i{display:block;width:15px;height:15px;border-radius:3px;background:var(--editor-text-color,#414852);box-shadow:inset 0 0 0 1px rgba(0,0,0,.18)}.kdl-past-paper-editor-richtext::selection,.kdl-past-paper-editor-richtext *::selection{background:#b9d7ff;color:inherit}

/* 관리자 해설 편집: 사이트 전체 선택 방지 CSS보다 높은 우선순위로 모든 하위 글자 선택 허용 */
html body .kdl-past-paper-editor .kdl-past-paper-editor-richtext,
html body .kdl-past-paper-editor .kdl-past-paper-editor-richtext *{
  -webkit-user-select:text!important;
  -moz-user-select:text!important;
  -ms-user-select:text!important;
  user-select:text!important;
  -webkit-touch-callout:default!important;
}
html body .kdl-past-paper-editor .kdl-past-paper-editor-richtext{cursor:text!important;caret-color:#111;touch-action:manipulation}

.kdl-past-paper-editor-size{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:8px!important;padding:4px 8px;border:1px solid #d9dce2;border-radius:9px;background:#fff}.kdl-past-paper-editor-size>span{font-size:12px!important;font-weight:800!important;color:#424851!important}.kdl-past-paper-editor-size select{height:30px;min-width:78px;border:1px solid #cfd3da;border-radius:7px;background:#fff;color:#242a33;padding:0 8px;font:inherit;font-size:14px;font-weight:800;cursor:pointer}.kdl-past-paper-editor-size select:focus{outline:2px solid rgba(246,191,0,.3);border-color:#e0ad00}

/* 해설 화면 편집 / HTML 편집 */
.kdl-past-paper-editor-explanation-head>div:first-child{display:flex;flex-direction:column;gap:3px;min-width:0}
.kdl-past-paper-editor-explanation-head>div:first-child>span{font-size:13px;font-weight:900;color:#373b43}
.kdl-past-paper-editor-explanation-head>div:first-child>small{font-size:12px;color:#727985;line-height:1.45}
.kdl-past-paper-editor-mode-switch{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;padding:3px;border:1px solid #d9dce2;border-radius:10px;background:#f5f6f8}
.kdl-past-paper-editor-mode-switch button{min-height:34px;padding:6px 11px;border-color:transparent;border-radius:7px;background:transparent;color:#646b76;font-size:13px;font-weight:850}
.kdl-past-paper-editor-mode-switch button:hover{border-color:#d3d7de;background:#fff}
.kdl-past-paper-editor-mode-switch button.is-active{border-color:#c8ccd4;background:#fff;color:#20242a;box-shadow:0 1px 3px rgba(32,36,42,.08)}
.kdl-past-paper-editor-html-wrap{display:block}
.kdl-past-paper-editor-html-wrap[hidden],.kdl-past-paper-editor-format-tools[hidden],.kdl-past-paper-editor-richtext[hidden]{display:none!important}
.kdl-past-paper-editor-html-source{display:block;width:100%;min-height:240px;box-sizing:border-box;border:1px solid #d7d9de;border-radius:11px;background:#161a22;padding:14px;color:#eef2f7;font-family:Consolas,"SFMono-Regular",Menlo,Monaco,"Liberation Mono",monospace!important;font-size:15px!important;line-height:1.65!important;tab-size:2;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;overflow-x:hidden;overflow-y:auto;resize:vertical;user-select:text!important;-webkit-user-select:text!important}
.kdl-past-paper-editor-html-source:focus{outline:3px solid rgba(246,191,0,.25);border-color:#e0ad00}
.kdl-past-paper-editor-html-wrap>small{display:block;margin-top:7px;color:#69707b;font-size:12px;line-height:1.55}
.kdl-past-paper-editor-richtext em{font-style:italic}
.kdl-past-paper-editor-richtext u{text-decoration:underline;text-underline-offset:2px}
.kdl-past-paper-editor-richtext br{user-select:text!important;-webkit-user-select:text!important}
@media(max-width:760px){.kdl-past-paper-editor-explanation-head{gap:9px}.kdl-past-paper-editor-mode-switch{width:100%;box-sizing:border-box}.kdl-past-paper-editor-mode-switch button{flex:1}.kdl-past-paper-editor-html-source{min-height:210px;font-size:14px!important}}
/* HTML 해설 표 편집 */
.kdl-past-paper-editor-richtext{overflow-x:auto;-webkit-overflow-scrolling:touch}
.kdl-past-paper-editor-richtext table{width:100%;min-width:560px;max-width:none;margin:8px 0;border-collapse:collapse;table-layout:auto;white-space:normal}
.kdl-past-paper-editor-richtext th,.kdl-past-paper-editor-richtext td{box-sizing:border-box;white-space:normal;word-break:keep-all;overflow-wrap:anywhere;vertical-align:top}
@media(max-width:760px){.kdl-past-paper-editor-richtext table{min-width:520px}}
