#draft-content img { border: 1px solid #d1d5db; border-radius: 12px; box-sizing: border-box; }

#draft-content { position: relative; }
#draft-content strong { font-weight: 600; }
#draft-content em { font-style: italic; }
#draft-content blockquote { border-left: 3px solid #d1d5db; padding-left: 20px; margin-left: 0; }
#draft-content .draft-table-frame { width: 100%; margin: 28px 0; border: 1px solid #d1d5db; border-radius: 12px; padding: 16px 20px; box-sizing: border-box; overflow-x: auto; }
#draft-content th:first-child, #draft-content td:first-child { width: 50%; }
#draft-content table { display: table; width: 100%; max-width: 100%; table-layout: auto; border-collapse: collapse; margin: 0 auto; box-sizing: border-box; font-size: .9em; line-height: 1.45; }
#draft-content th, #draft-content td { white-space: nowrap; }
#draft-content th + th, #draft-content td + td { padding-left: 24px; border-left: 1px solid #e5e7eb; }
#draft-content th:first-child, #draft-content td:first-child { padding-right: 24px; }
#draft-content th, #draft-content td { padding: 10px 8px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
#draft-content th { font-weight: 600; }
#draft-content th:first-child, #draft-content td:first-child { width: auto; padding-left: 0; text-align: left; }
#draft-content th:last-child, #draft-content td:last-child { padding-right: 0; }
#draft-content tbody tr:last-child td { border-top: 1px solid #9ca3af; border-bottom: 0; font-weight: 600; }
/* Text links use the shared prose rules in layout/links.css. */

#draft-content [data-footnotes] { margin-top: 3rem; font-size: .85em; line-height: 1.55; color: #666; }
#draft-content [data-footnotes] li { margin-bottom: 1em; scroll-margin-top: 2rem; }
#draft-content [data-footnote-ref] { scroll-margin-top: 2rem; }
#draft-content [data-footnotes] li:target { outline: 1px solid #d1d5db; outline-offset: .5em; }
.draft-sidenotes #draft-content [data-footnotes] { margin: 0; border: 0; }
.draft-sidenotes #draft-content [data-footnotes] h2 { display: none; }
.draft-sidenotes #draft-content [data-footnote-backref] { display: none; }
.draft-sidenotes #draft-content [data-footnotes] ol { margin: 0; padding: 0; }
.draft-sidenotes #draft-content [data-footnotes] li {
  position: absolute; left: var(--draft-note-left); width: 280px;
  margin: 0; padding-left: .2em; font-size: 15px; line-height: 1.55;
}
.draft-sidenotes #draft-content [data-footnotes] p { margin: 0 0 .7em; }


/* Draft-specific figure space; never change the global post layout. */

.draft-notice { color: #666; font-size: .9em; }
#draft-content .draft-thanks { margin-top: 32px; color: #777; font-size: .8em; line-height: 1.5; }
#draft-content h1:has(+ .draft-notice) { margin-bottom: 6px; }
#draft-content h1 + .draft-notice { margin-top: 0; }
#draft-content p:has(> img:only-child),
#draft-content p:has(> a:only-child > img:only-child),
#draft-content p:has(> picture:only-child),
#draft-content p:has(> a:only-child > picture:only-child) { width: 100%; max-width: 100%; margin-block: 28px; }
#draft-content img { display: block; width: 100%; cursor: zoom-in; }
#draft-content img:focus-visible { outline: 2px solid #ea580c; outline-offset: 4px; }
#draft-image-viewer { width: calc(100vw - 32px); max-width: 1600px; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #d1d5db; border-radius: 12px; color: #292929; background: white; }
#draft-image-viewer::backdrop { background: rgb(0 0 0 / .55); }
.draft-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 16px; border-bottom: 1px solid #d1d5db; }
#draft-image-title { font-size: 16px; line-height: 1.4; }
#draft-image-close { flex: none; min-height: 44px; }
.draft-viewer-scroll { overflow: auto; max-height: calc(100dvh - 140px); overscroll-behavior: contain; }
#draft-image-full { display: block; width: max(100%, 1200px); max-width: none; height: auto; }
@media (width < 1083px) {
  .page:has(#draft-content) main,
  .page:has(#draft-content) .sidebar { max-width: 660px; margin-inline: auto; }

  #draft-image-viewer { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
}



@media (width <= 900px) {
  #draft-content img, #draft-content a:has(img) { cursor: default; }
  #draft-content picture { display: block; width: 100%; max-width: none; margin-inline: auto; }
}
@media (width <= 700px) {
  #draft-content picture { width: calc(100% + 24px); margin-inline: -12px; }
  #draft-content .draft-table-frame { padding: 12px; }
  #draft-content table { table-layout: fixed; }
  #draft-content th, #draft-content td { white-space: normal; }
  #draft-content th:first-child, #draft-content td:first-child { width: 54%; padding-right: 12px; }
  #draft-content th + th, #draft-content td + td { padding-left: 12px; }
}
