.notice-toolbar { display:flex; flex-wrap:wrap; gap:6px; padding:10px; border:1px solid #cbd5e1; border-bottom:0; background:#f8fafc; }
.notice-toolbar button { width:auto; height:auto; padding:7px 10px; border:1px solid #cbd5e1; border-radius:4px; background:white; color:#222; font-size:14px; cursor:pointer; }
.notice-toolbar button:hover, .notice-toolbar button:focus-visible { background:#e0efff; outline:2px solid #3987be; }
.notice-editor { display:block; width:100%; box-sizing:border-box; min-height:400px; max-height:65vh; overflow:auto; padding:16px; border:1px solid #cbd5e1; background:white; font-size:16px; color:#333; }
.notice-editor:focus { outline:2px solid #3987be; outline-offset:-2px; }
.notice-content { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }
.notice-content p, .notice-content div { min-height:1.6em; margin:0; }
.notice-content b, .notice-content strong { font-weight:700; }
.notice-content i, .notice-content em { font-style:italic; }
.notice-content u { text-decoration:underline; }
.notice-content ul, .notice-content ol { margin:0; padding-left:1.8em; }
.notice-content ul { list-style:disc outside; }
.notice-content ol { list-style:decimal outside; }
.notice-content li { display:list-item; list-style:inherit; }
.notice-editor-hint { margin:8px 0; color:#666; font-size:13px; }

/* Keep the notice controls outside the scrolling editing area. */
#add_notice > .popup-inner, #fix_notice > .popup-inner {
    height: calc(100% - 64px);
    min-height: 0;
    box-sizing: border-box;
}
#add_notice > .popup-inner > *, #fix_notice > .popup-inner > * {
    flex-shrink: 0;
}
#add_notice #add_wrap, #fix_notice #fix_wrap {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow: hidden;
}
#add_notice .notice-toolbar, #fix_notice .notice-toolbar,
#add_notice .notice-editor-hint, #fix_notice .notice-editor-hint {
    flex: 0 0 auto;
}
#add_notice .notice-editor, #fix_notice .notice-editor {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior-y: contain;
}
#add_notice .txt-img, #fix_notice .txt-img {
    flex: 0 1 auto;
    min-height: 0;
    max-height: 120px;
    overflow-y: auto;
}

/* Override the admin-wide universal font-weight rule inside notice content. */
.notice-editor, .notice-editor * { font-weight: inherit !important; }
.notice-editor { font-weight: 400 !important; }
.notice-editor b, .notice-editor strong { font-weight: 700 !important; }
