/* Optional help controls stay independent of the selections they explain. */
body .selection-hint{display:inline-grid!important;place-items:center!important;flex:0 0 24px!important;width:24px!important;min-width:24px!important;height:24px!important;min-height:24px!important;margin:0!important;padding:0!important;border:1px solid #8b826c!important;border-radius:50%!important;background:transparent!important;color:var(--gold,#806348)!important;font:600 13px/1 var(--font,system-ui)!important;letter-spacing:0!important;text-transform:none!important;vertical-align:middle;cursor:pointer;box-shadow:none!important;transform:none!important;position:static}
body .selection-hint:hover{background:#bca56f25!important}body .selection-hint:focus-visible{outline:2px solid var(--gold,#806348);outline-offset:3px}
.selection-hint-wrap{display:inline-flex;align-items:center;gap:7px;min-width:0;max-width:100%;vertical-align:middle;position:relative}.selection-field-wrap{flex:1}.selection-field-wrap>input,.selection-field-wrap>select,.selection-field-wrap>textarea{min-width:0;flex:1;width:100%}.selection-card-wrap{display:block;height:100%}.selection-card-wrap>button:first-child{width:100%;height:100%}body .selection-card-wrap>.selection-hint{position:absolute!important;right:6px;top:6px;background:var(--paper,#eeeae1)!important;z-index:2}
.has-selection-hint{position:relative}.has-selection-hint>.selection-hint:not(.hint-inline){position:absolute!important;right:0;top:-2px}.has-selection-hint:has(>.selection-hint:not(.hint-inline)){padding-top:0}.has-selection-hint>.selection-hint.hint-inline{margin-left:6px!important}.plot-title>.selection-hint,.table-book h2>.selection-hint{margin-left:9px!important}
#selection-help-dialog{width:min(660px,calc(100vw - 32px));max-width:calc(100vw - 24px);max-height:85dvh;padding:0;background:var(--paper,#eeeae1);color:var(--ink,#242b28);border:1px solid var(--line,#c9c9be);border-radius:6px;overflow:auto;box-shadow:0 18px 65px #0006}#selection-help-dialog::backdrop{background:#0b1426a6}.selection-help-content{padding:34px 30px;overflow-wrap:anywhere}.selection-help-content h2{font-size:21px;margin:0 32px 8px 0;line-height:1.4}.selection-help-content h3{font-size:14px;margin:26px 0 10px}.selection-help-content p{font-size:14px;line-height:1.7}.help-category,.help-source-meta{color:var(--muted,#62665e)}.help-category{margin:0 0 18px}.help-source{border-top:1px solid var(--line,#c9c9be);padding:12px 0}.help-source summary{font-size:14px;cursor:pointer}.help-source-text{font-size:14px;white-space:pre-wrap;line-height:1.7;margin:12px 0}.help-source a{font-size:14px;text-decoration:underline}
@media(max-width:540px){.selection-help-content{padding:30px 20px}.selection-hint-wrap{gap:5px}.deck-filters>.selection-field-wrap{flex-basis:100%}.selection-card-wrap{height:auto}.atlas-tabs .selection-hint-wrap{gap:0}.atlas-tabs .selection-hint-wrap>button:first-child{padding-right:5px}}
@media print{.selection-hint{display:none!important}#selection-help-dialog{display:none}}
/* Keep the original full-width form controls after inserting their sibling hint. */
.selection-field-wrap{display:flex;width:100%}
.question-letter>.selection-hint-wrap:has(>.birth-particulars),.question-letter>.selection-hint-wrap:has(>.sig-choice),.question-letter>.selection-hint-wrap:has(>button[type=submit]){display:flex;width:100%}
.question-letter>.selection-hint-wrap:has(>.birth-particulars)>button:first-child,.question-letter>.selection-hint-wrap:has(>.sig-choice)>button:first-child,.question-letter>.selection-hint-wrap:has(>button[type=submit])>button:first-child{flex:1;min-width:0}
.handoff-primary>.selection-hint-wrap{flex:1}.handoff-primary>.selection-hint-wrap>button:first-child{flex:1}
.art-item>.selection-hint-wrap{display:block;width:100%}.art-item>.selection-hint-wrap>.art-preview{width:100%}.art-item>.selection-hint-wrap>.selection-hint{position:absolute!important;right:6px;top:6px;background:var(--paper)!important}
@media print{body .selection-hint{display:none!important}}
