html body.dd-wheel.nd-wheel :is(header,footer,aside,#stage,#focus-view-bar,#focus-search-panel,#focus-controls-panel,dialog) :is(button,a.button,input,select){border-radius:0!important;}
html body.dd-wheel.nd-wheel :is(.profile-tabs button,.profile-sidebar-heading button,#focus-view-enter){border-radius:0!important}
html body.dd-wheel.nd-wheel :is(header,aside,footer,dialog) a{color:#111!important}
/* Shared exhibition palette applied to the established relationship engine. */
:root{--ink:#111!important;--muted:#555!important;--paper:#fff!important;--line:#ccc!important;--pg-ink:#111!important;--pg-green:#111!important;--pg-paper:#fff!important;--pg-pink:#f1b9c3!important;--pg-line:#ccc!important}
body.nd-wheel{color:#111!important;background:#fff!important;}
body.nd-wheel>header,body.nd-wheel>footer{background:#fff!important;color:#111!important;border-color:#111!important}
.nd-wheel-brand{color:#111!important;text-decoration:none;min-height:44px;display:flex;align-items:center;margin-right:12px}
.nd-wheel-nav{display:flex;gap:18px;margin-right:auto}.nd-wheel-nav a{color:#111;min-height:44px;display:flex;align-items:center;text-decoration:none}.nd-wheel-nav a:hover{text-decoration:underline;text-underline-offset:5px}
body.nd-wheel #stage{background:#f5efe4!important}
body.nd-wheel :is(button,a.button,input,select){border-radius:0!important;color:#111!important;background:#fff!important;border-color:#999!important;min-height:44px}
body.nd-wheel :is(button:hover,a.button:hover){background:#f5efe4!important}
body.nd-wheel button[aria-pressed=true],body.nd-wheel button[aria-expanded=true]{background:#111!important;color:#fff!important}
body.nd-wheel :is(aside,#mini-profile,#focus-view-bar,#focus-search-panel,#focus-controls-panel,dialog,.family-reader,.wheel-record-panel){background:#fff!important;color:#111!important;border-radius:0!important;border-color:#111!important}
body.nd-wheel aside h2{color:#111!important}
body.nd-wheel aside :is(p,li,.life){color:#333!important}
body.nd-wheel aside h3{color:#111!important}
body.nd-wheel aside :is(a,.relative){color:#111!important;border-radius:0!important}
body.nd-wheel .card{background:var(--tint,#fff)!important;border-radius:2px!important;box-shadow:none!important;color:#111!important}
body.nd-wheel .card.selected{border-color:#111!important;box-shadow:0 0 0 4px #fac300!important}
body.nd-wheel .card span{color:#333!important}
body.nd-wheel :focus-visible{outline:3px solid #111!important;outline-offset:3px}
body.nd-wheel #focus-view-bar{box-shadow:0 4px 20px #0002!important}
body.nd-wheel #focus-view-enter{background:#fac300!important;color:#111!important;border-color:#111!important}
body.nd-wheel .profile-link{text-decoration:underline!important;text-underline-offset:4px;background:transparent!important;border:0!important;box-shadow:none!important}
body.nd-wheel #tooltip{background:#111!important;color:#fff!important;border-radius:0!important}
@media(max-width:650px){.nd-wheel-brand{margin:0}.nd-wheel-nav{gap:15px;margin-left:auto;margin-right:0}body.nd-wheel .top{gap:6px 10px}body.nd-wheel .search{flex:1;min-width:200px}body.nd-wheel .search input{width:100%;min-width:0}.nd-wheel #focus-view-bar{gap:4px!important}body.nd-wheel #focus-view-bar button{padding:8px!important}}

/* Explorer controls expose their tools directly, without a second disclosure. */
html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open>header{height:auto!important;min-height:0!important;width:min(620px,calc(100vw - 24px))!important;right:auto!important;padding:14px!important}
html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open>header .top{flex-wrap:wrap!important;gap:10px!important}
html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open .wheel-options{width:100%!important;margin:0!important}

html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open>header,html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open>footer{border-radius:0!important}
html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open .wheel-options>summary{display:none}
html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open .wheel-options{border:0;background:transparent;padding:0}
html body.dd-wheel.nd-wheel :is(#focus-view-bar,.drag-modes) button[aria-pressed=true],html body.dd-wheel.nd-wheel #focus-view-bar button[aria-expanded=true]{background:#111!important;color:#fff!important}
html body.dd-wheel.nd-wheel .wheel-options>summary{border-radius:0!important;background:#fff!important;color:#111!important;min-height:44px}

html body.dd-wheel.nd-wheel #dd-ux-tip{background:#111!important;color:#fff!important;border-radius:0!important}

html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open .wheel-options,html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open .wheel-options>.dna-controls{position:static!important;width:100%!important;max-width:none!important;max-height:none!important;background:#fff!important;box-shadow:none!important;border:0!important;border-radius:0!important;margin:0!important;padding:0!important}
html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open .wheel-options>.dna-controls{display:flex!important;flex-wrap:wrap!important;gap:8px!important}


/* Quiet color frames the tools and selected person. */
body.nd-wheel :is(#focus-view-bar,.profile-sidebar-heading){background:#cac2e7!important}
body.nd-wheel :is(.profile-tabs,.wheel-options>.dna-controls){background:#f5efe4!important}
body.nd-wheel dialog{border-top:8px solid #b9debf!important}
html body.dd-wheel.nd-wheel #ux-full-profile{background:#111!important;color:#fff!important;border:1px solid #111!important;border-radius:0!important;min-height:44px;display:inline-flex;align-items:center;padding:10px 14px;text-decoration:none}
html body.dd-wheel.nd-wheel #ux-full-profile:hover{background:#333!important}

/* Flat frames and explicit, readable selection cues. */
html body.dd-wheel.nd-wheel :is(.selected-marker,#selected-marker){background:#fac300!important;color:#111!important;border:1px solid #111!important;border-radius:0!important;box-shadow:none!important}
html body.dd-wheel.nd-wheel :is(.orientation,#family-overview,#overview-panel,#autosomal-definition,.dna-summary,.profile-facts){border-radius:0!important;box-shadow:none!important}
html body.dd-wheel.nd-wheel #autosomal-definition{background:#f5efe4!important;color:#111!important;border:1px solid #111!important;max-width:min(360px,calc(100vw - 40px))}
html body.dd-wheel.nd-wheel :is(dialog,.family-reader){max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);overflow:auto}
html body.dd-wheel.nd-wheel .dna-summary{background:#f5efe4!important;border-color:#d3d0ca!important}
html body.dd-wheel.nd-wheel #status{color:#444!important}

/* Interaction states: branch fill = identity; ink outline = selection; rose = connection. */
html body.dd-wheel.nd-wheel :is(.journey-panel,.journey-help-dialog,#search-results,#record-search-panel,.wheel-record-result){background:#fff!important;color:#111!important;border:1px solid #111!important;border-radius:0!important;box-shadow:0 4px 16px #0002!important}
html body.dd-wheel.nd-wheel #journey-panel{border-top:6px solid #f1b9c3!important}
html body.dd-wheel.nd-wheel #journey-panel button,html body.dd-wheel.nd-wheel #journey-launch{border-radius:0!important;min-height:44px!important}
html body.dd-wheel.nd-wheel #journey-panel .journey-choice{color:#111!important;background:#f5efe4!important}
html body.dd-wheel.nd-wheel :is(.journey-guide,.journey-choice){background:#f5efe4!important;color:#111!important;border-radius:0!important}
html body.dd-wheel.nd-wheel :is(.journey-panel button,.journey-launch){border-radius:0!important;min-height:44px!important;border-color:#111!important}
html body.dd-wheel.nd-wheel .journey-launch{background:#111!important;color:#fff!important}
html body.dd-wheel.nd-wheel.journey-active .journey-launch{background:#f1b9c3!important;color:#111!important}
html body.dd-wheel.nd-wheel .journey-panel button:hover{background:#f1b9c3!important;color:#111!important}
html body.dd-wheel.nd-wheel .journey-connection{border-color:#e83e8c}
html body.dd-wheel.nd-wheel :is(.journey-panel h2,.journey-help-dialog h2,.journey-origin,.journey-life,.journey-relationship,.journey-end-note,#focus-state,#generation-info,.record-match-area){color:#111!important}
html body.dd-wheel.nd-wheel :is(.journey-tip,#tooltip,#dd-ux-tip){background:#111!important;color:#fff!important;border:1px solid #fff!important;border-radius:0!important;box-shadow:none!important;pointer-events:none}
html body.dd-wheel.nd-wheel :is(.journey-panel,.journey-help-dialog) :focus-visible{outline:3px solid #111!important;outline-offset:3px!important}
html body.dd-wheel.nd-wheel :is(.journey-gallery a,.journey-gallery img){border-radius:0!important}
html body.dd-wheel.nd-wheel :is(.dna-comparison-result,.dna-comparison-estimate){background:#f5efe4!important;color:#111!important;border-color:#111!important}
html body.dd-wheel.nd-wheel #dna-comparison-results button[aria-pressed=true]{box-shadow:inset 4px 0 #f1b9c3!important}
html body.dd-wheel.nd-wheel input[type=range]{accent-color:#111}
html body.dd-wheel.nd-wheel dialog::backdrop{background:#1118}
@media(prefers-reduced-motion:reduce){body.nd-wheel *,body.nd-wheel *::before,body.nd-wheel *::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Mobile interaction layout: two toolbar rows and one scrollable reader. */
.nd-secondary-wheel-tools{display:flex;flex-wrap:wrap;gap:8px}
html body.dd-wheel.nd-wheel:not(.journey-active) #journey-launch{color:#fff!important}
@media(max-width:650px){
 html body.dd-wheel.nd-wheel.wheel-focus-view #focus-view-bar{grid-template-columns:repeat(4,minmax(0,1fr));padding:5px;gap:4px!important}
 html body.dd-wheel.nd-wheel #focus-view-bar button{min-width:0;min-height:44px;padding:6px 3px!important;font-size:12px!important;line-height:1.2!important;overflow-wrap:normal}
 html body.dd-wheel.nd-wheel #focus-view-bar .drag-modes{grid-column:span 2;order:1;min-width:0}
 html body.dd-wheel.nd-wheel #focus-view-bar .drag-modes button{flex:1;min-width:0}
 html body.dd-wheel.nd-wheel #focus-search{order:2}html body.dd-wheel.nd-wheel #focus-profile{order:3}
 html body.dd-wheel.nd-wheel #focus-minus{order:4}html body.dd-wheel.nd-wheel #focus-plus{order:5}
 html body.dd-wheel.nd-wheel #focus-controls{order:6}html body.dd-wheel.nd-wheel #focus-exit{order:7}
 html body.dd-wheel.nd-wheel #focus-view-state{top:var(--explorer-panel-top);font-size:12px;max-height:3em;overflow:hidden}
}
@media(max-width:800px),(max-height:500px) and (max-width:1000px){
 html body.dd-wheel.nd-wheel #journey-panel{height:auto;max-height:48dvh;padding:0 12px 10px;overflow:auto;display:block;scroll-padding:60px 0}
 html body.dd-wheel.nd-wheel #journey-panel>*{margin-block:8px}
 html body.dd-wheel.nd-wheel #journey-panel .journey-top{position:sticky;top:0;z-index:2;background:#fff;margin:0 -4px 8px;padding:5px 0;gap:4px}
 html body.dd-wheel.nd-wheel #journey-panel .journey-eyebrow{display:none}
 html body.dd-wheel.nd-wheel #journey-panel #journey-end{min-height:44px!important}
 html body.dd-wheel.nd-wheel #journey-panel .journey-reading-area{min-height:0;overflow:visible;padding:0}
 html body.dd-wheel.nd-wheel #journey-panel:not(.reader-expanded) :is(.journey-excerpt,.journey-gallery,#journey-read){display:none!important}
 html body.dd-wheel.nd-wheel #journey-panel .journey-choices{max-height:none;overflow:visible}
 html body.dd-wheel.nd-wheel #journey-panel .journey-bottom{position:sticky;bottom:-10px;background:#fff;padding-bottom:8px;grid-template-columns:repeat(4,minmax(0,1fr))}
 html body.dd-wheel.nd-wheel #journey-panel.reader-expanded{height:calc(100dvh - var(--explorer-panel-top,110px) - 16px);max-height:none}
 html body.dd-wheel.nd-wheel.journey-active:not(.journey-paused):not(.journey-reading) #journey-launch{bottom:calc(48dvh + 16px)}
 html body.dd-wheel.nd-wheel :is(aside,#family-reader,.journey-help-dialog){overscroll-behavior:contain}
}
@media(hover:none){.journey-tip,#dd-ux-tip{display:none!important}}

@media(max-height:500px) and (min-width:801px) and (max-width:1000px){
 html body.dd-wheel.nd-wheel #journey-panel{top:var(--explorer-panel-top,90px);bottom:8px;max-height:none;width:40vw;height:auto}
 html body.dd-wheel.nd-wheel #journey-panel #journey-reader-toggle{display:block}
 html body.dd-wheel.nd-wheel #journey-panel.reader-expanded{height:auto;top:var(--explorer-panel-top,90px);left:8px;right:8px;width:auto}
 html body.dd-wheel.nd-wheel.journey-active #journey-launch{bottom:8px;left:8px;right:auto}
}

/* Standard wheel launcher belongs to the wheel, clear of the mini profile. */
html body.dd-wheel.nd-wheel:not(.wheel-focus-view) #journey-launch{position:absolute!important;top:60px!important;bottom:auto!important;left:8px!important;right:auto!important;height:44px!important;max-width:calc(100% - 16px)}
html body.dd-wheel.nd-wheel #journey-launch:disabled{display:none}

/* Mobile audit: keep dismissal and navigation visible in every panel state. */
html body.dd-wheel.nd-wheel:is(.focus-search-open,.focus-controls-open,.focus-profile-open) #journey-launch{display:none!important}
@media(max-width:650px){
 html body.dd-wheel.nd-wheel #wheel-help dl{display:block!important}
 html body.dd-wheel.nd-wheel #wheel-help dt{font-size:16px!important;margin-top:20px}
 html body.dd-wheel.nd-wheel #wheel-help dd{font-size:16px!important;line-height:1.55!important;margin:4px 0 16px}
 html body.dd-wheel.nd-wheel #wheel-help .nd-dialog-close{position:sticky;top:-16px;background:#fff;z-index:4;margin:0 0 12px;padding:8px 0;display:flex;justify-content:flex-end}
 html body.dd-wheel.nd-wheel #wheel-help h2{font-size:24px!important}
 html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open>header{max-height:calc(100dvh - var(--explorer-panel-top) - 16px)!important;overflow:auto}
 html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open>footer{display:none!important}
 html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open .nd-wheel-nav{width:100%;margin:0;justify-content:space-between}
 html body.dd-wheel.nd-wheel.wheel-focus-view.focus-controls-open .wheel-entry-links .back{display:none!important}
 html body.dd-wheel.nd-wheel .profile-sidebar-heading h2{font-size:22px!important;line-height:1.15!important}
 html body.dd-wheel.nd-wheel .profile-tabs{gap:4px!important}
 html body.dd-wheel.nd-wheel .profile-tabs button{min-height:44px!important;padding:6px!important}
 html body.dd-wheel.nd-wheel .profile-sidebar-heading{padding-bottom:8px!important}
 html body.dd-wheel.nd-wheel :is(.journey-tip,#dd-ux-tip){display:none!important}
}
