.reverse-lookup-panel{padding:28px max(22px,5vw) 54px;color:#f7f4ed;background:#09182b}
.reverse-panel-card{margin-top:18px;padding:22px;border:1px solid #ffffff24;border-radius:16px;background:#102640db;box-shadow:0 16px 38px #0003}
.reverse-panel-card h2,.reverse-panel-card h3,.reverse-panel-card h4{font-family:Georgia,serif}.reverse-panel-card h2,.reverse-panel-card h3{margin:0 0 16px}.reverse-panel-card h4{margin:0 0 10px;color:#f2c76e;font-size:26px}
.reverse-panel-context{display:flex;align-items:end;gap:18px}.reverse-panel-context>div{margin-right:auto}.reverse-panel-context p{margin:0;color:#f2c76e;font-size:9px;font-weight:800;letter-spacing:.17em}.reverse-panel-context h2{margin:5px 0}.reverse-panel-context span,.reverse-panel-help,.reverse-panel-card p,.reverse-panel-card li{color:#bdc9d7;line-height:1.5}
.reverse-lookup-panel label{display:grid;gap:6px;min-width:160px;color:#bdc9d7;font-size:12px;font-weight:700}.reverse-lookup-panel select,.reverse-lookup-panel input,.reverse-lookup-panel button{min-height:44px;border:1px solid #ffffff2e;border-radius:9px;font:inherit}.reverse-lookup-panel select,.reverse-lookup-panel input{padding:0 11px;color:#f7f4ed;background:#07182b}.reverse-lookup-panel button{padding:0 14px;color:#f7f4ed;background:#ffffff12;cursor:pointer}.reverse-lookup-panel button:focus-visible{outline:2px solid #f2c76e;outline-offset:2px}.reverse-lookup-panel button:disabled{cursor:not-allowed;opacity:.45}
.reverse-panel-card form{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:end}.reverse-panel-card form label{min-width:0}.reverse-panel-note-picker{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:18px}.reverse-panel-note-picker button[aria-pressed=true],.reverse-panel-candidate[aria-pressed=true]{color:#102640;background:#f2c76e}
.reverse-panel-status{min-height:24px;margin:16px 4px 0;color:#b9e2cf}.reverse-panel-status[data-error=true]{color:#ffb3a7}.reverse-panel-results{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:18px}.reverse-panel-candidates{display:grid;gap:8px}.reverse-panel-candidate{text-align:left}.reverse-panel-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.reverse-panel-actions button:last-child{color:white;background:#d96957}
.reverse-lookup-panel-compact{padding:0;background:transparent}.reverse-lookup-panel-compact .reverse-panel-context{display:none}.reverse-lookup-panel-compact .reverse-panel-card{margin:10px 0;padding:14px;border-radius:10px;box-shadow:none}.reverse-lookup-panel-compact .reverse-panel-card form{grid-template-columns:1fr 1fr}.reverse-lookup-panel-compact .reverse-panel-card form label{grid-column:1/-1}.reverse-lookup-panel-compact .reverse-panel-help{font-size:11px}.reverse-lookup-panel-compact .reverse-panel-note-picker{grid-template-columns:repeat(4,1fr);gap:6px;margin-top:12px}.reverse-lookup-panel-compact .reverse-panel-note-picker button{min-width:0;padding:5px;font-size:11px}.reverse-lookup-panel-compact .reverse-panel-results{grid-template-columns:1fr;gap:0}.reverse-lookup-panel-compact .reverse-panel-card h3{font-size:16px}.reverse-lookup-panel-compact .reverse-panel-card h4{font-size:22px}.reverse-lookup-panel-compact .reverse-panel-actions{margin-top:10px}
.reverse-lookup-panel-compact .reverse-panel-help{display:none}.reverse-lookup-panel-compact .reverse-panel-results .reverse-panel-card{padding:10px 12px}.reverse-lookup-panel-compact .reverse-panel-candidates{max-height:180px;overflow:auto}
@media(max-width:900px){.reverse-lookup-panel{padding:20px 18px 42px}.reverse-panel-context{display:grid;grid-template-columns:1fr 1fr}.reverse-panel-context>div{grid-column:1/-1}.reverse-panel-context label{min-width:0}.reverse-panel-results{grid-template-columns:1fr}.reverse-panel-note-picker{grid-template-columns:repeat(4,1fr)}.reverse-lookup-panel-compact{padding:0}}

/* Batch 032 floating Reverse Lookup workspace. */
.reverse-lookup-panel-compact{padding:8px 12px 14px;background:transparent}
.reverse-lookup-panel-compact .reverse-panel-context{display:flex;margin:0;padding:8px 10px;gap:8px;background:rgba(255,255,255,.035)}
.reverse-lookup-panel-compact .reverse-panel-context>div{display:none}
.reverse-lookup-panel-compact .reverse-panel-context label{min-width:0;flex:1}
.reverse-lookup-panel-compact .reverse-panel-card{margin:8px 0;padding:12px;border-radius:10px;background:rgba(7,24,43,.46);box-shadow:none}
.reverse-lookup-panel-compact .reverse-panel-card form{display:block}
.reverse-lookup-panel-compact .reverse-panel-card form label{min-width:0}
.reverse-lookup-panel-compact .reverse-panel-results{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:8px}
.reverse-lookup-panel-compact .reverse-panel-card h3{font-size:15px}
.reverse-lookup-panel-compact .reverse-panel-card h4{font-size:22px}
.reverse-lookup-panel-compact .reverse-panel-actions{margin-top:10px}
.reverse-panel-heading,.reverse-midi-toolbar,.reverse-midi-modes{display:flex;align-items:center;gap:8px}
.reverse-panel-heading{justify-content:space-between}.reverse-panel-heading h3{margin:0}
.reverse-panel-heading button,.reverse-midi button,.reverse-midi select{min-height:34px;padding:4px 10px;font-size:11px}
.reverse-midi{margin-top:10px;padding-top:9px;border-top:1px solid #ffffff17}
.reverse-midi-toolbar strong{margin-right:auto;color:#f2c76e;font-size:11px;letter-spacing:.11em}
.reverse-midi-toolbar select{max-width:240px}.reverse-midi p{min-height:18px;margin:5px 0;color:#aebdce;font-size:10px}
.reverse-midi-modes button[aria-pressed="true"]{color:#102640;background:#f2c76e}.reverse-midi-modes [data-midi-capture]{margin-left:auto}
.reverse-panel-interpretations{margin-top:8px;color:#bdc9d7}.reverse-panel-interpretations summary{cursor:pointer;color:#f2c76e;font-size:12px;font-weight:800}.reverse-panel-interpretations ul{margin:7px 0 0;padding-left:18px}
.reverse-virtual-keyboard{display:flex!important;align-items:flex-start;gap:0!important;min-height:92px;margin-top:10px!important;padding:0 4px 7px;overflow-x:auto;overscroll-behavior-x:contain}
.reverse-virtual-keyboard button{position:relative;flex:0 0 38px;min-width:38px!important;height:88px;padding:0!important;border-radius:0 0 5px 5px!important;color:#182339!important;background:#f6f1e7!important}
.reverse-virtual-keyboard button.black-key{z-index:2;flex-basis:28px;min-width:28px!important;height:56px;margin:0 -14px;color:#f7f4ed!important;background:#142238!important}
.reverse-virtual-keyboard button[aria-pressed="true"]{color:#102640!important;background:#f2c76e!important;box-shadow:inset 0 -5px #d96957}
.reverse-virtual-keyboard button span{position:absolute;right:0;bottom:5px;left:0;font-size:9px}
.reverse-panel-status{margin:8px 4px 0}.reverse-panel-input-card>[data-reverse-selected-notes]{margin:5px 0 0;font-size:11px}
@media(max-width:760px){.reverse-lookup-panel-compact .reverse-panel-results{grid-template-columns:1fr}.reverse-lookup-panel-compact .reverse-panel-candidates{max-height:130px}.reverse-midi-toolbar{flex-wrap:wrap}.reverse-virtual-keyboard button{flex-basis:42px;min-width:42px!important}.reverse-virtual-keyboard button.black-key{flex-basis:30px;min-width:30px!important;margin:0 -15px}}

/* Batch 034 single-window Reverse Lookup. */
.reverse-lookup-panel-compact{padding:6px 10px 10px}
.reverse-lookup-panel-compact .reverse-panel-card{margin:6px 0;padding:10px;background:rgba(7,24,43,.38)}
.reverse-panel-topline,.reverse-note-result-row,.reverse-analysis-controls{display:flex;align-items:end;gap:8px}
.reverse-panel-topline{align-items:center}.reverse-panel-topline h2{margin:0 auto 0 0!important;font-size:18px}.reverse-midi-device{display:flex!important;align-items:center;gap:6px;min-width:190px!important}.reverse-midi-device span{font-size:10px;letter-spacing:.1em}.reverse-midi-device select{min-width:145px;min-height:34px!important}
.reverse-midi-status{min-height:14px;margin:2px 0 5px!important;font-size:10px;line-height:1.2!important;text-align:right}
.reverse-note-result-row form{flex:1;min-width:0}.reverse-note-result-row input{width:100%;min-height:38px}.reverse-primary-result{display:grid;min-width:92px}.reverse-primary-result span{color:#9eafc2;font-size:9px;text-transform:uppercase;letter-spacing:.09em}.reverse-primary-result strong{overflow:hidden;color:#f2c76e;font:700 20px Georgia,serif;text-overflow:ellipsis;white-space:nowrap}.reverse-note-result-row>[data-reverse-clear]{min-height:38px;padding:0 9px;font-size:11px}
.reverse-lookup-panel-compact .reverse-virtual-keyboard{min-height:70px;margin-top:7px!important}.reverse-lookup-panel-compact .reverse-virtual-keyboard button{flex-basis:30px;min-width:30px!important;height:68px}.reverse-lookup-panel-compact .reverse-virtual-keyboard button.black-key{flex-basis:22px;min-width:22px!important;height:43px;margin:0 -11px}.reverse-virtual-keyboard button.captured:not(:active){box-shadow:inset 0 -4px #a77a34}
.reverse-panel-status{min-height:16px;margin:4px 2px 0;font-size:10px}.reverse-analysis-card{position:relative}.reverse-analysis-controls{align-items:end}.reverse-analysis-controls label{min-width:0!important;flex:1;font-size:10px}.reverse-analysis-controls label:first-child{flex:1.35}.reverse-analysis-controls select{width:100%;min-height:34px!important;padding:0 7px!important;font-size:11px}
.reverse-analysis-card [data-reverse-detail]{margin-top:8px}.reverse-analysis-card h4{display:none}.reverse-analysis-card [data-reverse-detail]>p{margin:3px 0;font-size:11px;line-height:1.3}.reverse-analysis-card [data-reverse-detail]>h3{margin:8px 0 3px;font:800 11px system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase}.reverse-analysis-card ul{display:grid;gap:3px;margin:0;padding:0;list-style:none}.reverse-analysis-card li{padding:5px 7px;border-radius:6px;background:#ffffff0a;font-size:11px;line-height:1.25}.reverse-analysis-card .reverse-panel-actions{position:absolute;right:10px;bottom:10px;margin:0}.reverse-analysis-card .reverse-panel-actions button{min-height:32px;padding:0 9px;font-size:11px}.reverse-analysis-card [data-reverse-add][hidden]{display:none}
@media(max-width:520px){.reverse-panel-topline{align-items:flex-start}.reverse-midi-device{min-width:165px!important}.reverse-note-result-row{align-items:end}.reverse-analysis-controls{flex-wrap:wrap}.reverse-analysis-controls label:first-child{flex-basis:100%}.reverse-analysis-card{padding-bottom:48px!important}}

/* Batch 036: recognition-first Mong Kok East glass workspace. */
.reverse-lookup-panel{--rl-emerald:#13884f;--rl-mint:#82dcca;--rl-jade:#20b69d;--rl-deep:#075a43;--rl-pale:#d5f1e8}
.reverse-lookup-panel-compact{padding:5px 9px 9px}
.reverse-lookup-panel-compact .reverse-analysis-card{display:flex;flex-direction:column;gap:8px;margin:0;padding:10px 11px 11px;border-color:rgba(130,220,202,.2);background:linear-gradient(155deg,rgba(7,24,43,.58),rgba(7,90,67,.13))}
.reverse-panel-topline{align-items:center;order:0;min-height:34px}.reverse-panel-topline h2{font-size:16px!important}.reverse-midi-device{min-width:188px!important}.reverse-midi-device select{border-color:rgba(130,220,202,.28);background:rgba(5,25,37,.86)}
.reverse-midi-status{order:1;min-height:13px;margin:-5px 0 0!important;color:var(--rl-mint)!important}
.reverse-primary-result{order:2;display:grid;min-width:0;padding:4px 6px 2px;text-align:center}.reverse-primary-result span{color:#9fbfb8;font-size:9px;font-weight:800;letter-spacing:.14em}.reverse-primary-result strong{max-width:100%;overflow:hidden;color:var(--rl-mint);font:700 clamp(36px,4vw,44px)/1.05 Georgia,serif;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 4px 18px rgba(32,182,157,.2)}.reverse-primary-result strong[data-long="true"]{font-size:clamp(25px,3vw,32px)}
.reverse-analysis-card [data-reverse-detail]{order:3;margin:0}.reverse-analysis-card [data-reverse-detail]>p{margin:0 0 5px;color:#b9cec9;font-size:10px;text-align:center}.reverse-analysis-card [data-reverse-detail]>h3{margin:0 0 4px;color:var(--rl-mint);font-size:10px;text-align:center}.reverse-analysis-card ul{display:grid;gap:4px}.reverse-analysis-card li{display:grid;grid-template-columns:auto auto;align-items:baseline;justify-content:center;gap:2px 7px;padding:7px 9px;border:1px solid rgba(19,136,79,.18);border-radius:7px;color:var(--rl-deep);background:rgba(213,241,232,.94);font-size:12px;font-weight:700;text-align:center}.reverse-analysis-card li strong{font:700 21px/1 Georgia,serif}.reverse-analysis-card li span{min-width:0}.reverse-analysis-card li small{grid-column:1/-1;color:#376f62;font-size:10px;font-weight:650}
.reverse-analysis-controls{order:4;align-items:end;gap:6px}.reverse-analysis-controls label{color:#aebfbc;font-size:9px}.reverse-analysis-controls label:first-child{flex:1.45}.reverse-analysis-controls select{border-color:rgba(130,220,202,.2);background:rgba(5,25,37,.85)}
.reverse-input-area{order:5;padding-top:7px;border-top:1px solid rgba(130,220,202,.16)}.reverse-note-result-row{align-items:end}.reverse-note-result-row form{flex:1;min-width:0}.reverse-note-result-row input{min-height:36px;border-color:rgba(130,220,202,.25);background:rgba(5,25,37,.76)}.reverse-note-result-row>[data-reverse-clear]{min-height:36px}
.reverse-lookup-panel-compact .reverse-virtual-keyboard{min-height:64px;margin-top:6px!important;padding-bottom:3px;overflow-x:hidden}.reverse-lookup-panel-compact .reverse-virtual-keyboard button{flex:1 1 0;min-width:0!important;height:62px;border-color:rgba(7,90,67,.18)}.reverse-lookup-panel-compact .reverse-virtual-keyboard button.black-key{z-index:2;flex:0 0 18px;min-width:18px!important;height:40px;margin:0 -9px}.reverse-virtual-keyboard button[aria-pressed="true"]{color:#052b22!important;background:var(--rl-mint)!important;box-shadow:inset 0 -4px var(--rl-emerald)}.reverse-virtual-keyboard button.captured:not(:active){box-shadow:inset 0 -4px var(--rl-jade),0 0 0 1px var(--rl-deep)}
.reverse-keyboard-range{min-height:12px;margin:2px 0 0!important;color:var(--rl-mint)!important;font-size:9px!important;text-align:center}
.reverse-panel-bottom{order:6;display:flex;min-height:34px;align-items:center;gap:8px}.reverse-panel-bottom .reverse-panel-status{min-width:0;flex:1;margin:0;font-size:9px}.reverse-panel-bottom .reverse-panel-actions{position:static;margin:0}.reverse-panel-bottom [data-reverse-preview]{min-width:72px;color:#fff;border-color:var(--rl-emerald);background:var(--rl-emerald)}.reverse-panel-bottom [data-reverse-preview]:focus-visible{outline-color:var(--rl-mint)}
@media(max-width:520px){.reverse-lookup-panel-compact .reverse-analysis-card{padding-bottom:10px!important}.reverse-analysis-controls{display:grid;grid-template-columns:1.4fr 1fr 1fr}.reverse-analysis-controls label:first-child{grid-column:auto}.reverse-primary-result strong{font-size:36px}.reverse-primary-result strong[data-long="true"]{font-size:25px}}
@media(prefers-reduced-transparency:reduce){.reverse-lookup-panel-compact .reverse-analysis-card,.reverse-midi-device select,.reverse-analysis-controls select,.reverse-note-result-row input{background:#0b2131}.reverse-analysis-card li{background:var(--rl-pale)}}
@media(prefers-reduced-motion:reduce){.reverse-lookup-panel *{scroll-behavior:auto!important;transition:none!important}}

/* Batch 038: compact, accessible figured-bass typography. */
.reverse-analysis-card li strong{display:inline-flex;align-items:center;white-space:nowrap}.reverse-analysis-card li .roman-figure-column{display:inline-flex;flex-direction:column;justify-content:center;margin:0 1px;font-size:.65em;line-height:.72;vertical-align:middle}.reverse-analysis-card li .roman-figure-column>span{display:block}.reverse-analysis-card li .roman-annotation,.reverse-analysis-card li .roman-target{font-size:.72em}

@font-face{font-family:'MonChord Source Serif';src:url('../assets/fonts/source-serif-4-variable-roman.woff2') format('woff2');font-style:normal;font-weight:200 900;font-display:swap}

/* Batch 053.13 Phase 2B shared notation typography. */
.reverse-lookup-panel{
  --music-notation-chord-font:var(--mc-notation-family,'MonChord Source Serif',Georgia,'Times New Roman',serif);
  --music-notation-roman-font:var(--mc-notation-family,'MonChord Source Serif',Georgia,'Times New Roman',serif);
  --music-notation-chord-weight:var(--mc-chord-weight,250);
  --music-notation-roman-weight:var(--mc-roman-weight,300);
}
.reverse-primary-result strong,.reverse-analysis-controls [data-reverse-candidates]{
  font-family:var(--music-notation-chord-font);
  font-weight:var(--music-notation-chord-weight);
  font-synthesis:none;
}
.reverse-analysis-card li strong{
  font-family:var(--music-notation-roman-font);
  font-weight:var(--music-notation-roman-weight);
  font-synthesis:none;
}
