/* Scene heading/description stay on stage; speech tools live in a common floating window. */
#conversationHUD{position:fixed;top:var(--stage-description-top,154px);left:16px;right:var(--conversation-right,370px);z-index:160;pointer-events:none;color:#edf3f9}
#conversationHUD[hidden],#conversationHUD [hidden]{display:none!important}
#conversationHeading{margin:0 0 12px 128px;min-height:40px;text-shadow:0 2px 8px #000;pointer-events:none}
#conversationHeading>span{font-size:10px;letter-spacing:.12em;color:#b8d2dc}#conversationTitle{font-size:20px;line-height:1.3;margin:3px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#conversationTools,#conversationDescription{pointer-events:auto;border:1px solid #71839090;background:#14202dec;border-radius:7px;max-width:960px;margin:0 0 6px}
#conversationTools>summary,#conversationDescription>summary{cursor:pointer;padding:9px 12px;font-size:12px;margin:0}#conversationSummary{font-size:11px;color:#b8d2dc;overflow-wrap:anywhere}
.conversationBody{padding:0 12px 10px;max-height:33vh;overflow:auto;overscroll-behavior:contain}.conversationSpeakerRow{display:flex;align-items:end;gap:6px;flex-wrap:wrap}.conversationSpeakerRow label{margin:0;flex:1 1 160px;font-size:11px}.conversationSpeakerRow select{padding:6px;margin:4px 0 0;font-size:12px}
#dialoguePanel button{font-size:11px;padding:6px 9px}.conversationCastHeading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;font-size:12px}.conversationHint{font-size:11px;margin:5px 0 8px;line-height:1.5}
#dialoguePanel #stageCast{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px;margin:0;padding:3px 3px 8px;align-items:stretch;overscroll-behavior:contain}
#dialoguePanel #conversationCastHost #stageCast{margin:0}
#dialoguePanel .stageCharacter{position:relative;flex:0 0 138px;display:grid;grid-template-columns:36px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;justify-items:start;gap:3px 6px;min-width:0;max-width:none;padding:7px;text-align:left}
#dialoguePanel .stageCharacter img,#dialoguePanel .stageInitial{grid-row:1 / 3;width:36px;height:48px;min-height:0;object-fit:contain;font-size:28px;text-align:center}#dialoguePanel .stageCharacter strong{font-size:12px;min-width:0;max-width:100%;line-height:1.3}#dialoguePanel .stageCharacter small{font-size:10px;color:#bdcbd7;overflow-wrap:anywhere}#dialoguePanel .stageCharacter[aria-disabled=true]{cursor:default;border-style:dashed}
#dialoguePanel .stageCharacter:focus-visible{outline:2px solid #9adeef;outline-offset:1px}
#conversationGMTools{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;border-top:1px solid #71839050;padding-top:8px}
#conversationDescription{max-height:22vh;overflow:auto}body[data-stage-description=summary] #stageNarrative>.badge,body[data-stage-description=summary] #stageNarrative>h2{display:none}
body[data-stage-preset=conversation] #stageBackground img,body[data-stage-preset=conversation] #stageBackground video{opacity:1}
body[data-stage-preset=conversation][data-stage-pcs=false] #novelOverlay{z-index:150;right:var(--conversation-right,370px);padding:16px}body[data-stage-preset=conversation] .novelBox{width:100%;max-width:960px}
@media(max-width:900px){#conversationHUD{right:16px}body[data-stage-preset=conversation] #novelOverlay{right:0}}
@media(max-width:600px){#conversationHUD{left:12px;right:12px}#conversationHeading{margin-left:120px;margin-bottom:10px}#conversationTitle{font-size:16px}.conversationBody{max-height:29vh;padding:0 9px 8px}.conversationSpeakerRow{gap:5px}.conversationSpeakerRow label{flex-basis:100%}#dialoguePanel button{padding:6px;font-size:11px}#dialoguePanel .stageCharacter{flex-basis:132px}#conversationDescription{max-height:18vh}body[data-stage-preset=conversation] #novelOverlay{padding:8px}body[data-stage-preset=conversation] .novelBox{padding:12px;min-height:150px}}

/* Common tools are a floating window; their dimensions never define the portrait area. */
#dialoguePanel .conversationBody{padding:0;max-height:none;overflow:visible}
#dialoguePanel #conversationTools{margin:0;border:0;background:none;max-width:none}
#dialoguePanel #conversationTools>summary{padding:4px 0 10px}
#dialoguePanel #conversationCastHost #stageCast{margin:0;flex-wrap:wrap;overflow:visible}
#dialoguePanel .stageCharacter{flex:1 1 155px;max-width:100%}
#dialoguePanel #conversationGMTools{margin-bottom:4px}

body[data-stage-presentation=true][data-stage-pcs=true] #conversationHUD{right:264px}
body[data-stage-presentation=true][data-stage-pcs=true][data-master-party=collapsed] #conversationHUD{right:180px}
@media(max-width:600px){
 body[data-stage-presentation=true] #conversationHUD,body[data-stage-presentation=true][data-stage-pcs=true] #conversationHUD,body[data-stage-presentation=true][data-stage-pcs=true][data-master-party=collapsed] #conversationHUD{right:12px;top:var(--stage-description-top,154px)}
 body[data-stage-presentation=true][data-scene-kind] #novelOverlay{right:0}
}
