/* Rich note content keeps the campaign's cyan, magenta and gold accents. */
.nb-document { container-type:inline-size; container-name:note; }
.nb-section { display:flow-root; clear:both; min-width:0; margin:1rem 0; padding:.75rem; border:1px solid #374047; border-top:3px solid var(--cyan); border-radius:8px; background:#101416; container-type:inline-size; container-name:section; }
.nb-section:nth-child(even) { border-top-color:var(--pink); }
.nb-section-head { display:flex; align-items:center; gap:.5rem; justify-content:space-between; margin-bottom:.6rem; }
.nb-section-head h2 { margin:0; font-size:1.15rem; color:var(--yellow); }
.nb-section-controls { display:none; align-items:center; gap:.25rem; }
.nb-editing .nb-section-controls { display:flex; }
.nb-section-controls button { font-size:.75rem; padding:.3rem .45rem; }
[data-section-drag] { cursor:grab; }
.nb-section-body { display:flow-root; min-height:2rem; outline:none; }
.nb-section-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:.85rem; align-items:start; clear:both; }
.nb-section-row[data-section-layout=wide-left] { grid-template-columns:minmax(0,2fr) minmax(0,1fr); }
.nb-section-row[data-section-layout=wide-right] { grid-template-columns:minmax(0,1fr) minmax(0,2fr); }
.nb-section-row>.nb-section { margin:.5rem 0; }
.nb-section[data-section-drop] { outline:3px solid var(--cyan); outline-offset:2px; }
.nb-section[data-section-drop=left] { border-left:8px solid var(--yellow); }
.nb-section[data-section-drop=right] { border-right:8px solid var(--yellow); }
.nb-section[data-section-drop=before] { border-top:8px solid var(--yellow); }
.nb-section[data-section-drop=after] { border-bottom:8px solid var(--yellow); }
.nb-sheet-embed { clear:both; min-width:0; border:1px solid #53604a; border-radius:6px; overflow:hidden; }
.nb-sheet-caption { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.4rem; padding:.5rem; color:var(--cyan); background:#082027; font-size:.72rem; }
.nb-sheet-caption button { font-size:.75rem; }
.nb-sheet-embed .combatant-sheet { margin:0; border:0; padding:.65rem; }
.nb-sheet-embed .combatant-display { grid-template-columns:minmax(0,200px) minmax(0,1fr); gap:.65rem; }
.nb-sheet-embed .combatant-image { display:inline-block; width:auto; max-width:100%; max-height:none; }
.nb-sheet-embed .combatant-image img { width:auto; height:auto; max-width:100%; max-height:200px; object-fit:contain; }
.nb-sheet-embed .combatant-stats { gap:.25rem; }
.nb-sheet-embed .combatant-attacks { padding-left:1rem; }
.nb-sheet-drawer { margin:0 0 0 auto; width:min(760px,96vw); max-width:96vw; height:100dvh; max-height:100dvh; padding:1.2rem; border:1px solid var(--cyan); border-top:4px solid var(--pink); background:#101416; color:var(--ink); overflow:auto; }
.nb-sheet-drawer h2 { color:var(--yellow); }
.nb-sheet-drawer::backdrop { background:#0009; }
.nb-sheet-save { position:sticky; bottom:-1.2rem; display:flex; flex-wrap:wrap; gap:.4rem; padding:.8rem 0; background:#101416; border-top:1px solid var(--cyan); }
.nb-flex figure[data-image-placement=wrap-left],.nb-flex figure[data-image-placement=wrap-right] { width:42%; max-width:28rem; margin:.2rem 1rem .6rem 0; }
.nb-flex figure[data-image-placement=wrap-left] { float:left; }
.nb-flex figure[data-image-placement=wrap-right] { float:right; margin:.2rem 0 .6rem 1rem; }
.nb-flex figure[data-image-placement=inline] { display:inline-block; vertical-align:middle; width:auto; max-width:45%; margin:.25rem .5rem; float:none; }
.nb-flex figure[data-image-placement=full] { display:block; float:none; clear:both; width:100%; margin:.75rem 0; }
.nb-flex figure[data-image-placement][data-image-size=small] { max-width:12rem; }
.nb-flex figure[data-image-placement][data-image-size=medium] { max-width:24rem; }
.nb-flex figure[data-image-placement=full][data-image-size=fit] { max-width:100%; }
.nb-section-body>table { clear:both; }
.nb-flex span.nb-note-image { display:inline-block; vertical-align:middle; max-width:45%; margin:.25rem .5rem; }
.nb-flex span.nb-note-image img { display:block; max-width:100%; height:auto; }
.nb-flex span.nb-note-image[data-image-size=small] { width:min(12rem,45%); }
.nb-flex span.nb-note-image[data-image-size=medium] { width:min(24rem,45%); }
@container note (max-width:760px) { .nb-section-row,.nb-section-row[data-section-layout] { grid-template-columns:minmax(0,1fr); } }
@container section (max-width:450px) {
 .nb-flex .nb-note-image[data-image-placement] { float:none; display:block; width:100%; max-width:100%; margin:.6rem 0; }
 .nb-sheet-embed .combatant-display { display:block; }
 .nb-sheet-embed .combatant-image,.nb-sheet-embed .combatant-image-placeholder { max-width:140px; }
 .nb-sheet-embed .combatant-stat-block .section-title { flex-wrap:wrap; }
}
@container note (max-width:450px) { .nb-flex .nb-note-image[data-image-placement] { float:none; display:block; width:100%; max-width:100%; margin:.6rem 0; } }
