.rich-description { min-width: 0; margin-bottom: 12px; }
.rich-description [hidden] { display: none !important; }
.rich-description-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.rich-description-top > span { color: var(--muted, #655e52); font-size: 12px; }
.rich-description button { min-height: 40px; min-width: 40px; padding: 8px 10px; border: 1px solid var(--border, #dfd1bd); border-radius: 9px; background: var(--surface, #fffdf9); color: inherit; font: inherit; cursor: pointer; }
.rich-description button:focus-visible { outline: 2px solid #207571; outline-offset: 2px; }
.rich-description button:disabled { opacity: .55; cursor: default; }
.rich-description-content { min-height: 112px; padding: 12px; border: 1px solid var(--border, #dfd1bd); border-radius: 10px; background: var(--surface, #fffdf9); overflow-wrap: anywhere; }
.rich-description-content:focus { outline: 2px solid #207571; outline-offset: 2px; }
.rich-description-content > :first-child { margin-top: 0; }
.rich-description-content > :last-child { margin-bottom: 0; }
.rich-description-content p { margin: .65em 0; }
.rich-description-content a { color: #1b6c68; text-decoration: underline; }
.rich-description-content blockquote { margin-left: 0; border-left: 3px solid #b5a88f; padding-left: 12px; }
.rich-description-content pre { padding: 12px; border-radius: 8px; background: #eee7d9; overflow-x: auto; white-space: pre; }
.rich-description-content code { font-size: .9em; }
.rich-description-content img { display: block; max-width: 100%; max-height: 420px; object-fit: contain; }
.rich-description-content video { display: block; max-width: 100%; max-height: 420px; }
.rich-description-content table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.rich-description-content th, .rich-description-content td { min-width: 28px; padding: 7px; border: 1px solid #c8bba6; vertical-align: top; }
.rich-description-content th { background: #efe7d8; }
.rich-description-content .selectedCell { background: #d6e9e4; }
.rich-description-content ul[data-type="taskList"] { padding-left: 0; list-style: none; }
.rich-description-content li[data-type="taskItem"] { display: flex; align-items: baseline; gap: 8px; }
.rich-description-content li[data-type="taskItem"] > div { flex: 1; min-width: 0; }
.rich-description-menu { position: fixed; z-index: 60; display: flex; flex-wrap: wrap; gap: 4px; box-sizing: border-box; padding: 6px; background: #fffdf9; border: 1px solid #d5c7b0; border-radius: 12px; box-shadow: 0 4px 18px #36291426; }
.rich-description-menu button { flex: 0 0 auto; font-size: 13px; }
.rich-description-link { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border: 1px solid #d5c7b0; border-radius: 10px; }
.rich-description-link input { flex: 1 1 220px; width: 100%; min-width: 0; }
.rich-description-error { color: #a73328; font-size: 13px; }
@media (max-width: 600px) {
  .rich-description-top { align-items: flex-start; }
  .rich-description-top > span { max-width: 210px; }
  .rich-description-content { padding: 10px; }
}
.rich-description-slash { position: fixed; z-index: 61; box-sizing: border-box; display: flex; flex-direction: column; gap: 3px; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 6px; border: 1px solid #d5c7b0; border-radius: 12px; background: #fffdf9; box-shadow: 0 4px 18px #36291426; }
.rich-description-slash button { width: 100%; text-align: left; }
.rich-description-slash button[data-active="true"] { background: #d6e9e4; border-color: #79a9a1; }
.rich-description-image-picker { box-sizing: border-box; width: min(520px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 10px; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 12px; border: 1px solid #d5c7b0; border-radius: 12px; background: #fffdf9; color: inherit; }
.rich-description-image-picker::backdrop { background: #211c1866; }
.rich-description-image-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 60dvh; overflow-y: auto; }
.rich-description-image-gallery button { display: flex; flex-direction: column; gap: 4px; padding: 6px; min-width: 0; }
.rich-description-image-gallery img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.rich-description-image-gallery span { width: 100%; font-size: 12px; overflow-wrap: anywhere; }
.rich-description-image-picker button { text-align: left; overflow-wrap: anywhere; }

.rich-description-image-picker:not([open]) { display: none; }
/* Tiptap's editable TaskItem node view exposes data-checked, not data-type. */
.rich-description-content ul[data-type="taskList"] > li { display: flex; align-items: flex-start; gap: 6px; min-height: 40px; }
.rich-description-content ul[data-type="taskList"] > li > label { display: flex; flex: 0 0 40px; align-items: center; justify-content: center; width: 40px; min-height: 40px; margin: 0; padding: 0; cursor: pointer; }
.rich-description-content ul[data-type="taskList"] > li > label input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--teal, #1f6f6a); }
.rich-description-content ul[data-type="taskList"] > li > div { flex: 1; min-width: 0; }

.rich-description-content .rich-description-image { position: relative; display: block; width: fit-content; max-width: 100%; margin: .65em 0; line-height: 0; }
.rich-description-content .rich-description-image img { height: auto; }
.rich-description-image.is-selected { outline: 2px solid #207571; outline-offset: 2px; }
.rich-description .rich-description-image-resize { position: absolute; left: max(0px, calc(100% - 40px)); bottom: 0; box-sizing: border-box; width: 40px; height: 40px; min-width: 40px; padding: 0; line-height: 1; border-color: #207571; color: #174f4b; background: #fffdf9; cursor: ew-resize; touch-action: none; opacity: 0; pointer-events: none; }
.rich-description-image:hover .rich-description-image-resize, .rich-description-image.is-selected .rich-description-image-resize, .rich-description-image:focus-within .rich-description-image-resize { opacity: 1; pointer-events: auto; }
.rich-description-content .rich-description-issue-source { display: none; }
.rich-description-content .rich-description-issue-chip { display: inline-flex; align-items: center; gap: 5px; box-sizing: border-box; max-width: 100%; min-height: 32px; padding: 2px 6px; vertical-align: middle; border: 1px solid #c8d8ce; border-radius: 6px; background: #edf4ed; text-decoration: none; font-size: .9em; }
.rich-description-issue-chip > span { min-width: 0; }
.rich-description-issue-chip > span:not(.rich-description-issue-title):not(.rich-description-issue-dot) { flex: 0 0 auto; max-width: calc(100% - 20px); }
.rich-description-issue-chip > .rich-description-issue-title { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rich-description-issue-chip > .rich-description-issue-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #6f827a; }
.rich-description-content .rich-description-issue-chip:not(a) { display: inline-block; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: inherit; vertical-align: baseline; }
.rich-description-issue-ref:focus-visible { outline: 2px solid #207571; outline-offset: 2px; }
.rich-description-issue-ref[aria-disabled="true"] { cursor: default; opacity: .65; }
@media (pointer: coarse), (max-width: 600px) { .rich-description-content .rich-description-issue-chip { min-height: 40px; } }

.rich-description-mention { display: inline; padding: 1px 3px; border-radius: 4px; color: #7050b2; background: #f0eafa; white-space: normal; overflow-wrap: anywhere; }
.rich-description-mention.is-self { color: #236b48; background: #e1f2e8; }
.rich-description-mention-menu { box-sizing: border-box; position: fixed; z-index: 1250; max-height: min(344px, calc(100dvh - 24px)); overflow-y: auto; padding: 4px; border: 1px solid var(--border, #dedce3); border-radius: 10px; background: var(--panel, #fff); box-shadow: 0 8px 30px #2222; }
.rich-description-mention-menu[hidden] { display: none; }
.rich-description-mention-menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 40px; padding: 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; }
.rich-description-mention-menu button[data-active="true"] { background: var(--hover, #f0eef5); }
.rich-description-mention-menu button span, .rich-description-mention-menu button small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rich-description-mention-menu button span { flex: 1 1 auto; }
.rich-description-mention-menu button small { flex: 0 0 auto; max-width: 65%; color: var(--muted, #777); white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; }
