.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.owner-menu { padding-block: .65rem; border-bottom: 1px solid #d6e2d9; background: #edf4ee; }
.owner-menu .actions { gap: .4rem .55rem; }
.owner-menu button { min-height: 2.5rem; padding-inline: .6rem; font-size: .9rem; }
.owner-menu button[data-open="post-list"] { color: #205a47; background: white; }
.owner-menu [role="status"] { font-size: .9rem; }
.owner-menu [role="status"] { margin-block: .55rem .15rem; }
.owner-drafts { display: grid; gap: .65rem; padding: 0; list-style: none; }
.owner-drafts li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
button { font: inherit; display: inline-block; border: 1px solid #205a47; border-radius: .35rem;
  background: #205a47; color: white; padding: .4rem .75rem; cursor: pointer; text-decoration: none; }
button.secondary, button[data-close] { color: #205a47; background: white; }
button:disabled { opacity: .65; cursor: wait; }
dialog { box-sizing: border-box; width: min(40rem, calc(100% - 1rem)); max-height: calc(100dvh - 1rem);
  --blog-text: #20332b; --blog-link: #205a47; --blog-heading: Georgia, serif;
  color: #20332b; background: white; font-family: system-ui, sans-serif;
  border: 1px solid #a6b5ac; border-radius: .7rem; padding: clamp(1rem, 4vw, 1.6rem); }
dialog::backdrop { background: #14231cb3; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.dialog-head button { font-size: 1.25rem; line-height: 1; min-width: 2.75rem; min-height: 2.75rem; }
dialog form { display: grid; gap: .85rem; margin-block: .8rem; }
label, output { display: block; }
input, textarea, select { font: inherit; display: block; width: 100%; margin-top: .25rem; padding: .45rem;
  border: 1px solid #6a8174; border-radius: .3rem; background: white; color: #20332b; }
textarea { resize: vertical; }
[data-ai-review] img { display: block; width: 100%; height: auto; margin-block: .75rem; }
[data-apply-ai] { margin-top: .75rem; }
output { overflow-wrap: anywhere; }
.help { position: relative; }
.help summary { display: inline-block; cursor: pointer; font-weight: 600; list-style: none; }
.help summary::-webkit-details-marker { display: none; }
.help summary span[aria-hidden] { border: 1px solid currentColor; border-radius: 50%; display: inline-grid;
  place-items: center; width: 1.25rem; height: 1.25rem; font-size: .8rem; margin-left: .15rem; }
.bubble { position: absolute; top: 100%; left: 0; width: min(26rem, 100%); z-index: 1; margin: .3rem 0 0;
  background: #edf5ef; color: #20332b; border: 1px solid #6a8174; border-radius: .4rem; padding: .7rem; }
.bubble::before { position: absolute; top: -.35rem; left: 1rem; width: .6rem; height: .6rem; content: '';
  transform: rotate(45deg); background: inherit; border-top: 1px solid #6a8174; border-left: 1px solid #6a8174; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#preview { width: min(55rem, calc(100% - 1rem)); }
#appearance-preview { width: min(62rem, calc(100% - 1rem)); }
iframe { width: 100%; height: 65dvh; border: 1px solid #a6b5ac; margin-top: 1rem; }
html:has(#draft[open]) { overflow: hidden; }
#draft {
  --editor-gutter: clamp(.65rem, 3vw, 1.65rem);
  --editor-line: #d9e3da;
  --editor-ink: #20332b;
  position: fixed;
  inset: var(--draft-top, 0) auto auto var(--draft-left, 0);
  width: var(--draft-width, 100%);
  height: var(--draft-height, 100dvh);
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #f2f5f1;
}
#draft[open], #draft form[data-editor] { display: flex; flex-direction: column; }
#draft .dialog-head {
  flex: 0 0 auto;
  padding: max(.6rem, env(safe-area-inset-top)) var(--editor-gutter) .5rem;
  border-bottom: 1px solid var(--editor-line);
  background: #fff;
}
#draft .dialog-head h2 {
  font-family: inherit;
  font-size: 1.06rem;
  font-weight: 650;
}
#draft .dialog-head button {
  flex: none;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  border-color: var(--editor-line);
  border-radius: .65rem;
}
#draft [data-editor-loading] { padding-inline: var(--editor-gutter); }
#draft form[data-editor] { flex: 1; gap: 0; min-height: 0; margin: 0; }
.editor-tools, .post-footer { background: #fff; }
.editor-tools { position: relative; z-index: 2; border-bottom: 1px solid var(--editor-line); }
.editor-tools-inner, .post-footer-inner {
  width: min(100%, 56rem);
  margin-inline: auto;
  padding-inline: var(--editor-gutter);
}
.editor-tools-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .6rem;
  padding-block: .45rem;
}
.editor-tools-row, .editor-tool-group { display: flex; align-items: center; gap: .2rem; }
.editor-tools-row { gap: .4rem; min-width: 0; }
.editor-tool-group {
  padding: .12rem;
  border: 1px solid var(--editor-line);
  border-radius: .65rem;
  background: #f7f9f6;
}
#draft .editor-tools button, #draft .editor-more summary, .editor-block-style select {
  min-height: 2.5rem;
  border-radius: .45rem;
  color: var(--editor-ink);
  font-size: .87rem;
  font-weight: 550;
}
#draft .editor-tool-group button, #draft .editor-more-panel button {
  border: 1px solid transparent;
  padding: .26rem .5rem;
  background: transparent;
  white-space: nowrap;
}
#draft .editor-tools button:hover:not(:disabled), #draft .editor-more summary:hover { background: #e9f0e9; }
#draft .editor-tools button[aria-pressed="true"] {
  border-color: #b0c8b6;
  background: #dbece0;
  color: #173c2e;
}
#draft :is(button, select, summary):focus-visible { outline: 2px solid #205a47; outline-offset: 2px; }
#draft .editor-tools button:disabled { opacity: .5; cursor: default; }
#draft .editor-tools .editor-tool-symbol {
  min-width: 2.5rem;
  font-size: 1.03rem;
  line-height: 1;
}
#draft .editor-tools [data-command="bold"] { font-weight: 800; }
.editor-tool-symbol[data-command="italic"] { font-style: italic; }
.editor-tool-symbol[data-command="strike"] { text-decoration: line-through; }
.editor-tool-symbol[data-command="undo"], .editor-tool-symbol[data-command="redo"] { font-family: system-ui, sans-serif; }
.editor-block-style { min-width: 0; flex: 1 1 auto; }
.editor-block-style select {
  width: auto;
  max-width: 100%;
  margin: 0;
  padding-inline: .45rem;
  border-color: var(--editor-line);
  background: #f7f9f6;
}
.editor-more { position: relative; }
#draft .editor-more summary {
  display: flex;
  align-items: center;
  gap: .38rem;
  list-style: none;
  cursor: pointer;
  padding: .24rem .48rem;
  border: 1px solid var(--editor-line);
  background: #fff;
}
.editor-more summary::-webkit-details-marker { display: none; }
.editor-more summary::after {
  width: .35rem;
  height: .35rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-.08rem);
  content: "";
}
.editor-more-panel {
  position: absolute;
  right: 0;
  top: calc(100% + .35rem);
  display: grid;
  min-width: 12.5rem;
  max-height: min(18rem, calc(var(--draft-height, 100dvh) * .49));
  overflow: auto;
  padding: .28rem;
  border: 1px solid #c4d4c7;
  border-radius: .65rem;
  box-shadow: 0 .6rem 1.65rem #20332b26;
  background: #fff;
}
#draft .editor-more-panel button { text-align: start; }
.post-scroll { min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; }
.post-paper {
  width: min(100% - 2 * var(--editor-gutter), 48rem);
  min-height: min(32rem, 100%);
  margin: var(--editor-gutter) auto;
  padding: clamp(1rem, 3.5vw, 2.1rem);
  border: 1px solid var(--editor-line);
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 .36rem 1.3rem #20332b0a;
}
.post-title { margin-bottom: .8rem; }
.post-title label { color: #40584a; font-size: .89rem; font-weight: 600; }
.post-title input {
  margin-top: 0;
  padding: .2rem 0 .36rem;
  border: 0;
  border-bottom: 1px solid var(--editor-line);
  border-radius: 0;
  color: var(--editor-ink);
  font-family: Georgia, serif;
  font-size: clamp(1.52rem, 4vw, 2.15rem);
  font-weight: 650;
  line-height: 1.25;
}
.post-paper .help { font-size: .88rem; }
.editor-content { margin-top: .35rem; }
.editor-content .tiptap { min-height: 12rem; padding-block: .45rem; outline: none; overflow-wrap: anywhere; }
.editor-content .tiptap:focus-visible { outline: 2px solid #205a47; outline-offset: .22rem; border-radius: .2rem; }
.tiptap h3 { font-family: var(--blog-heading); font-size: 1.27rem; }
.tiptap hr { margin-block: 1.2rem; border: 0; border-top: 1px solid #9ab1a3; }
.post-details-panel { margin-top: 1.2rem; padding-top: .8rem; border-top: 1px solid var(--editor-line); }
.post-details-panel summary { cursor: pointer; color: #205a47; font-weight: 600; font-size: .92rem; }
.post-footer { flex: 0 0 auto; border-top: 1px solid var(--editor-line); }
.post-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem .9rem;
  padding-block: .4rem max(.55rem, env(safe-area-inset-bottom));
}
.post-footer [data-editor-status] { min-height: 1.22em; margin: 0; font-size: .82rem; }
.post-footer .actions { gap: .35rem; }
.post-footer .actions button { min-height: 2.5rem; padding-inline: .58rem; font-size: .88rem; border-radius: .5rem; }
@media (max-width: 40rem) {
  .post-paper {
    width: 100%;
    margin-block: 0;
    border-inline: 0;
    border-top: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .post-footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 24rem) {
  .editor-tools-inner { gap: .16rem .4rem; }
  .editor-tools-row { gap: .28rem; }
  .editor-tool-group { gap: .08rem; }
}
.tiptap > :first-child { margin-top: 0; }
.tiptap > :last-child { margin-bottom: 0; }
.tiptap blockquote { margin-inline: 0; padding-inline-start: 1rem; border-inline-start: 3px solid #a6b5ac; }
.tiptap figure { margin: 1rem 0; padding: .2rem; }
.tiptap figure.ProseMirror-selectednode { outline: 2px solid #205a47; border-radius: .3rem; }
.tiptap img { display: block; max-width: 100%; height: auto; }
.tiptap figcaption { color: #45584f; font-size: .9rem; }
.post-details { display: grid; gap: .65rem; margin-top: .5rem; }
.check { display: flex; align-items: center; gap: .5rem; min-height: 2rem; }
.check input { width: 1.25rem; height: 1.25rem; margin: 0; }
.storage { margin: .25rem 0 1rem; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  padding: 0; gap: .65rem; list-style: none; }
.image-grid li { padding: .55rem; border: 1px solid #d6ded6; border-radius: .4rem; }
.image-grid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain;
  background: #f7f7f3; }
.image-grid p { margin: .35rem 0; font-size: .9rem; overflow-wrap: anywhere; }
.image-grid button { font-size: .9rem; min-height: 2.75rem; }
[data-crop-preview] { display: block; max-width: 100%; max-height: 38dvh; margin-inline: auto; background: #f7f7f3; }
.crop-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .85rem; }
.crop-controls input { min-height: 2.5rem; margin: 0; padding: 0; accent-color: #205a47; }
.theme-colors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.theme-colors input { min-height: 2.75rem; padding: .2rem; cursor: pointer; }
.theme-cover-name { margin: 0; overflow-wrap: anywhere; }
[data-theme-status]:empty { margin: 0; }
[hidden] { display: none !important; }
.admin-search { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; }
.admin-search label { flex: 1 1 14rem; }
.admin-list { padding: 0; list-style: none; }
.admin-list li { padding: .65rem 0; border-bottom: 1px solid #d6ded6; overflow-wrap: anywhere; }
.admin-list .meta { display: block; }
.admin-settings { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem .85rem; }
.admin-settings dt { font-weight: 600; }
.admin-settings dd { margin: 0; overflow-wrap: anywhere; }
.admin-setup-key { overflow-wrap: anywhere; }
#admin-security .dialog-head h2, #admin-login .dialog-head h2 { min-width: 0; overflow-wrap: anywhere; }
#admin-security .dialog-head button, #admin-login .dialog-head button { flex-shrink: 0; }
