.admin-only { display: none !important; }
.is-admin .admin-only { display: inline-block !important; }
.editor-entry { padding: 2rem 0; font-size: .9rem; }
.editor-entry button { background: transparent; color: inherit; border: 1px solid currentColor; padding: .5rem 1rem; border-radius: .4rem; cursor: pointer; }
.editor-bar { position: fixed; inset: auto 0 0; z-index: 1100; box-sizing: border-box; height: calc(4.5rem + env(safe-area-inset-bottom, 0px)); padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px)); background: #102342; color: #fff; display: flex; flex-wrap: nowrap; align-items: center; gap: .65rem; overflow-x: auto; box-shadow: 0 -2px 12px #0004; }
.is-admin { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
.editor-bar button { flex: 0 0 auto; white-space: nowrap; }
.editor-bar span { flex: 1 1 auto; min-width: 0; margin-right: auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.editor-bar button,.editor-dialog button,.admin-only { font: inherit; font-size: 1rem; border: 1px solid #819cc3; border-radius: .4rem; padding: .55rem .8rem; cursor: pointer; background: #fff; color: #112748; }
.editor-bar button:disabled,.editor-dialog button:disabled { opacity: .6; cursor: wait; }
[data-edit-text] { white-space: pre-wrap; }
.is-editing [data-edit-text] { outline: 1px dashed #397ace; outline-offset: 3px; cursor: text; }
.is-editing [data-edit-text]:empty { display: inline-block; min-width: 2rem; min-height: 1em; }
.is-editing [data-edit-text]:focus { outline: 2px solid #236bc7; background: #a9d2ff26; }
.is-editing [data-edit-image] { outline: 2px dashed #397ace; cursor: pointer; }
.editor-link-control { font: 12px sans-serif; margin-left: .5rem; padding: .3rem; vertical-align: middle; }
.editor-dialog { width: min(680px,calc(100% - 2rem)); max-height: 88vh; overflow: auto; border: 1px solid #c6d4e8; border-radius: 12px; padding: 1.5rem; color: #142944; background: #fff; box-shadow: 0 16px 80px #0005; }
.editor-dialog::backdrop { background: #06152bb3; }
.editor-dialog h2 { font-size: 1.5rem; margin: 0 0 1rem; }
.editor-dialog label { display: block; margin: .85rem 0; font: 500 1rem/1.4 system-ui,sans-serif; }
.editor-dialog input:not([type=checkbox]),.editor-dialog textarea,.editor-dialog select { display:block; width:100%; box-sizing:border-box; margin-top:.3rem; padding:.65rem; border:1px solid #8297b2; border-radius:5px; font:400 1rem/1.4 system-ui,sans-serif; color:#142944; background:#fff; }
.editor-dialog textarea { min-height: 6rem; }
.editor-dialog img { max-width: 100%; max-height: 220px; object-fit: contain; }
.editor-dialog .actions { display:flex; flex-wrap:wrap; gap:.6rem; margin-top:1.2rem; }
.editor-dialog [role=status] { min-height:1.5em; }
.editor-post-row { display:flex; gap:.5rem; justify-content:space-between; align-items:center; padding:.7rem 0; border-bottom:1px solid #d8e0ec; }
.editor-dialog button.danger { color:#9b2020; }
.editor-dialog .preview-card { margin-top: 1rem; padding: 1rem; background: #eef4fc; border-radius: 8px; }
@media(max-width:600px) { .editor-bar span { display: none; } .editor-bar { font-size:.9rem; } .editor-bar button { font-size:.9rem; padding:.45rem; } .editor-dialog { padding:1rem; } }

.text-format-toolbar { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.75rem; }
.rich-text-input { min-height:10rem; max-height:50vh; overflow:auto; padding:1rem; border:1px solid #8297b2; border-radius:6px; white-space:pre-wrap; font:inherit; line-height:1.6; }
.rich-text-input:focus { outline:2px solid #236bc7; }
.rich-text-input a { color:#236bc7; text-decoration:underline; }
