/* Online Key Changer 1.0.0 | onlinepitchchanger.com | brand: #0067FF primary, #22B8F0 accent (waveform), #0F172A navy.
   Readability: sizes in px (themes such as Astra shrink rem), help text ≥ 15px, labels ≥ 13px; all text ≥ 4.5:1 contrast. */
.opc-kc{--kc-blue:#0067ff;--kc-blue2:#0052cc;--kc-cyan:#22b8f0;--kc-navy:#0f172a;--kc-navy2:#1e293b;--kc-text:#334155;--kc-muted:#475569;--kc-light:#f0f7ff;--kc-line:#d6e4f5;--kc-ok:#15803d;--kc-warn:#b45309;--kc-err:#b91c1c;
	max-width:1040px;margin:0 auto 1.75em;color:var(--kc-text);font:16px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;box-sizing:border-box;text-align:left}
.opc-kc *,.opc-kc *::before,.opc-kc *::after{box-sizing:border-box}
.opc-kc [hidden]{display:none!important}
.opc-kc p,.opc-kc dl,.opc-kc dd,.opc-kc h2,.opc-kc h3{margin:0}
.opc-kc button,.opc-kc select,.opc-kc input{font:inherit;letter-spacing:normal;text-transform:none;box-shadow:none;margin:0}
.opc-kc button{cursor:pointer;line-height:1.2}
.opc-kc button:disabled{cursor:not-allowed}
.opc-kc :focus-visible{outline:3px solid var(--kc-blue);outline-offset:2px}
.opc-kc-head{margin:0 0 12px}
.opc-kc-title{margin:0;font-size:24px;line-height:1.25;font-weight:800;color:var(--kc-navy);letter-spacing:-.01em}
.opc-kc-lead{margin:4px 0 0;color:var(--kc-muted);font-size:16px}
.opc-kc-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.opc-kc-label{display:block;font-size:15px;font-weight:700;color:var(--kc-navy);margin:0 0 4px}
.opc-kc-unit{font-weight:600;color:var(--kc-muted)}
.opc-kc-hint{display:block;margin:4px 0 0;font-size:15px;line-height:1.45;color:var(--kc-muted)}
.opc-kc-stepno{display:inline-block;margin-right:6px;padding:2px 8px;border-radius:99px;background:var(--kc-navy);color:#fff;font-size:13px;font-weight:800;letter-spacing:.02em;text-transform:none;vertical-align:2px}

/* Step 1: drop zone */
.opc-kc-drop{position:relative;border:2px dashed #9cc3f5;border-radius:16px;background:var(--kc-light);padding:12px;transition:border-color .15s,background .15s}
.opc-kc.is-drag .opc-kc-drop{border-color:var(--kc-blue);background:#e3efff}
.opc-kc-file{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip:rect(0 0 0 0)}
.opc-kc-droplabel{display:flex;align-items:center;gap:14px;min-height:96px;padding:12px 14px;border-radius:12px;background:var(--kc-blue);color:#fff;cursor:pointer;margin:0;transition:background .15s}
.opc-kc-droplabel:hover{background:var(--kc-blue2)}
.opc-kc-file:focus-visible+.opc-kc-droplabel{outline:3px solid var(--kc-navy);outline-offset:3px}
.opc-kc-dropicon{flex:0 0 40px;width:40px;height:40px;color:#fff}
.opc-kc-droptext{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0}
.opc-kc-droplabel .opc-kc-stepno{background:#fff;color:var(--kc-blue2)}
.opc-kc-droptext strong{font-size:20px;line-height:1.25;color:#fff}
.opc-kc-dropsub{font-size:15px;color:#fff;line-height:1.4}
.opc-kc-droprow{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 12px;margin-top:8px}
.opc-kc-private{display:inline-flex;align-items:flex-start;gap:6px;font-size:15px;color:var(--kc-muted)}
.opc-kc-private svg{width:16px;height:16px;color:var(--kc-ok);flex:0 0 16px;margin-top:3px}
.opc-kc-linkbtn{min-height:44px;padding:0 4px;border:0;background:none;color:var(--kc-blue2);font-weight:700;font-size:16px;text-decoration:underline;text-underline-offset:3px;text-align:left}
.opc-kc-linkbtn:hover,.opc-kc-linkbtn:focus{background:none;color:var(--kc-navy)}
.opc-kc-bar{height:8px;border-radius:99px;background:#dbe7f7;overflow:hidden;margin-top:8px}
.opc-kc-bar span{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--kc-blue),var(--kc-cyan));transition:width .2s}
.opc-kc-bar.is-busy span{width:35%!important;animation:opc-kc-slide 1.2s linear infinite}
@keyframes opc-kc-slide{from{transform:translateX(-100%)}to{transform:translateX(300%)}}
.opc-kc-status{margin-top:6px;font-size:15px;color:var(--kc-navy);min-height:2.9em}
.opc-kc-status[data-kind=busy]{color:var(--kc-navy);font-weight:600}
.opc-kc-status[data-kind=ok]{color:var(--kc-ok);font-weight:600}
.opc-kc-status[data-kind=ok]::before{content:"✓ "}
.opc-kc-status[data-kind=error]{color:var(--kc-err);font-weight:700}
.opc-kc-status[data-kind=error]::before{content:"⚠ "}
.opc-kc.is-loaded .opc-kc-droplabel{min-height:60px;padding:8px 12px;background:#fff;color:var(--kc-blue2);border:1px solid #9cc3f5}
.opc-kc.is-loaded .opc-kc-droplabel:hover{background:#e3efff}
.opc-kc.is-loaded .opc-kc-droptext strong{color:var(--kc-navy);font-size:17px}
.opc-kc.is-loaded .opc-kc-dropsub,.opc-kc.is-loaded .opc-kc-droplabel .opc-kc-stepno{display:none}
.opc-kc.is-loaded .opc-kc-dropicon{width:28px;height:28px;flex-basis:28px;color:var(--kc-blue)}

/* cards */
.opc-kc-card{border:1px solid var(--kc-line);border-radius:16px;background:#fff;padding:14px}
.opc-kc-h3{margin:0 0 6px;font-size:17px;line-height:1.3;font-weight:800;color:var(--kc-navy)}
.opc-kc-bigkey{font-size:32px;line-height:1.15;font-weight:800;color:var(--kc-navy)}
.opc-kc-bigkey output{display:inline}
.opc-kc-bigkey[data-kind=empty]{font-size:20px;color:var(--kc-muted)}
.opc-kc-keymeta{margin-top:4px;font-size:15px;color:var(--kc-text);min-height:2.9em}
.opc-kc-keymeta b{color:var(--kc-navy)}
.opc-kc-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:10px 0}
.opc-kc-facts div{padding:6px 10px;border-radius:10px;background:var(--kc-light);min-width:0}
.opc-kc-facts .opc-kc-factwide{grid-column:1/-1}
.opc-kc-facts dt{font-size:13px;font-weight:700;color:var(--kc-muted)}
.opc-kc-facts dd{margin:0;font-weight:700;color:var(--kc-navy);font-size:16px;overflow-wrap:anywhere}
.opc-kc-field{display:flex;flex-direction:column;gap:4px;margin:0;font-size:15px;color:var(--kc-navy);font-weight:700}
.opc-kc .opc-kc-field select{min-height:44px;height:auto;width:100%;max-width:100%;border:1px solid #94a3b8;border-radius:10px;background:#fff;color:var(--kc-navy);padding:0 10px;font-size:16px;font-weight:600}

/* player */
.opc-kc-player{border-radius:16px;background:var(--kc-navy);padding:12px;color:#fff}
.opc-kc-now{min-height:1.5em;margin:0 0 8px;font-size:16px;font-weight:700;color:#fff}
.opc-kc-now b{color:var(--kc-cyan)}
.opc-kc-now[data-which=a] b{color:#fff;text-decoration:underline;text-underline-offset:3px}
.opc-kc-wave{position:relative;height:104px;border-radius:10px;background:#0b1224;overflow:hidden;cursor:pointer;touch-action:pan-y;box-shadow:inset 0 0 0 1px #334155}
.opc-kc-wave canvas{display:block;width:100%;height:100%}
.opc-kc-wave:focus-visible{outline:3px solid var(--kc-cyan);outline-offset:2px}
.opc-kc-waveempty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#cbd5e1;font-size:15px;text-align:center;padding:0 12px}
.opc-kc-transport{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px 14px;margin-top:10px}
.opc-kc-play{display:inline-flex;align-items:center;gap:8px;min-height:52px;padding:0 20px 0 14px;border-radius:99px;border:0;background:var(--kc-blue);color:#fff;font-weight:800;font-size:17px}
.opc-kc-play:hover,.opc-kc-play:focus{background:var(--kc-blue2);color:#fff}
.opc-kc-play:disabled{background:#334155;color:#cbd5e1}
.opc-kc-play svg{width:24px;height:24px;fill:currentColor}
.opc-kc-play:focus-visible{outline-color:var(--kc-cyan)}
.opc-kc-abwrap{display:flex;flex-direction:column;gap:2px}
.opc-kc-ablabel{font-size:13px;font-weight:700;color:#cbd5e1}
.opc-kc-seg{display:inline-flex;flex-wrap:wrap;border-radius:12px;padding:3px;gap:3px;background:#e8f0fb}
.opc-kc-seg button{min-height:44px;padding:0 14px;border:0;border-radius:9px;background:transparent;color:var(--kc-navy);font-weight:700;font-size:15px;white-space:nowrap}
.opc-kc-seg button:hover,.opc-kc-seg button:focus{background:#d7e6fb;color:var(--kc-navy)}
.opc-kc-seg button[aria-checked=true]{background:var(--kc-blue);color:#fff}
.opc-kc-seg button[aria-checked=true]::before{content:"● ";font-size:.8em}
.opc-kc-ab{background:#1e293b}
.opc-kc-ab button{color:#e2e8f0}
.opc-kc-ab button:hover,.opc-kc-ab button:focus{background:#334155;color:#fff}
.opc-kc-ab button[aria-checked=true]{background:var(--kc-cyan);color:var(--kc-navy)}
.opc-kc-ab button[data-kc-ab=a][aria-checked=true]{background:#fff;color:var(--kc-navy)}
.opc-kc-ab button:focus-visible{outline-color:var(--kc-cyan)}
.opc-kc-time{margin-left:auto;font-variant-numeric:tabular-nums;color:#e2e8f0;font-size:16px;font-weight:600;padding-bottom:12px}
.opc-kc-looprow{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin-top:10px}
.opc-kc-sbtn{min-height:44px;padding:0 12px;border-radius:10px;border:1px solid #64748b;background:transparent;color:var(--kc-navy);font-weight:700;font-size:15px}
.opc-kc-player .opc-kc-sbtn{color:#f1f5f9;border-color:#64748b}
.opc-kc-sbtn:hover,.opc-kc-sbtn:focus{background:var(--kc-light);color:var(--kc-navy)}
.opc-kc-player .opc-kc-sbtn:hover,.opc-kc-player .opc-kc-sbtn:focus{background:#1e293b;color:#fff}
.opc-kc-sbtn[aria-pressed=true],.opc-kc-player .opc-kc-sbtn[aria-pressed=true]{background:var(--kc-cyan);border-color:var(--kc-cyan);color:var(--kc-navy)}
.opc-kc-sbtn:disabled,.opc-kc-player .opc-kc-sbtn:disabled{color:#94a3b8;border-color:#475569}
.opc-kc-player .opc-kc-sbtn:focus-visible{outline-color:var(--kc-cyan)}
.opc-kc-loopinfo{margin-top:6px;font-size:15px;color:#cbd5e1}

/* Step 2: key picker */
.opc-kc-change{margin:2px 0 10px;font-size:16px;color:var(--kc-text)}
.opc-kc-change strong{display:block;font-size:24px;line-height:1.2;color:var(--kc-navy)}
.opc-kc-change strong[data-kind=same]{font-size:19px;color:var(--kc-muted)}
.opc-kc-piano{position:relative;display:flex;height:140px;margin:0 0 4px;user-select:none;-webkit-user-select:none}
.opc-kc-pk{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:0 0 8px;border:0;font-weight:800}
.opc-kc-pk.is-white{flex:1 1 0;min-width:44px;height:100%;margin-right:2px;border-radius:0 0 10px 10px;background:#fff;color:var(--kc-navy);box-shadow:inset 0 0 0 1px #94a3b8}
.opc-kc-pk.is-white:last-child{margin-right:0}
.opc-kc-pk.is-black{position:absolute;z-index:2;top:0;left:calc((100% + 2px) / 7 * var(--opc-kc-x) - 23px);width:44px;height:62%;border-radius:0 0 8px 8px;background:var(--kc-navy);color:#fff;padding-bottom:6px}
.opc-kc-pk:hover{filter:brightness(.95)}
.opc-kc-pk.is-black:hover{background:var(--kc-navy2);filter:none}
.opc-kc-pk[aria-checked=true].is-white{background:var(--kc-blue);color:#fff;box-shadow:inset 0 0 0 1px var(--kc-blue2)}
.opc-kc-pk[aria-checked=true].is-black{background:var(--kc-blue);color:#fff;box-shadow:0 0 0 2px #fff inset}
.opc-kc-pk.is-orig.is-white{box-shadow:inset 0 0 0 1px #94a3b8,inset 0 -6px 0 var(--kc-cyan)}
.opc-kc-pk.is-orig.is-black{box-shadow:inset 0 -6px 0 var(--kc-cyan)}
.opc-kc-pkname{font-size:17px;line-height:1.1}
.opc-kc-pk.is-black .opc-kc-pkname{font-size:14px}
.opc-kc-pkshift{font-size:14px;font-weight:800;color:var(--kc-muted);min-height:1.1em;margin-top:3px}
.opc-kc-pk.is-black .opc-kc-pkshift{font-size:13px;color:#e2e8f0}
.opc-kc-pk[aria-checked=true] .opc-kc-pkshift{color:#fff}
.opc-kc-piano.is-off .opc-kc-pk{cursor:not-allowed}
.opc-kc-piano.is-off .opc-kc-pkshift{visibility:hidden}
.opc-kc-dirrow{margin:12px 0}
.opc-kc-steprow{margin-bottom:10px}
.opc-kc-stepper{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.opc-kc-step{display:inline-grid;place-items:center;min-width:52px;height:48px;padding:0 8px;border-radius:12px;border:1px solid #94a3b8;background:#fff;color:var(--kc-navy);font-size:18.5px;font-weight:800}
.opc-kc-step:hover,.opc-kc-step:focus{background:var(--kc-light);color:var(--kc-navy)}
.opc-kc .opc-kc-semi{width:78px;max-width:78px;flex:0 0 78px;height:48px;min-height:48px;margin:0;border:1px solid #94a3b8;border-radius:12px;text-align:center;font-size:21px;font-weight:800;color:var(--kc-navy);background:#fff;padding:0 4px;-moz-appearance:textfield}
.opc-kc-range{display:block;margin:0 0 8px}
.opc-kc-range output{font-weight:800;color:var(--kc-blue2)}
.opc-kc .opc-kc-range input{display:block;width:100%;height:44px;min-height:44px;accent-color:var(--kc-blue);margin:0;padding:0;border:0;background:transparent}
.opc-kc-tune{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:8px 10px;border-radius:12px;background:#fff7ed;color:#7c2d12;font-size:15px;margin-bottom:8px}
.opc-kc-tune .opc-kc-sbtn{border-color:#c2410c;color:#7c2d12}
.opc-kc-tune .opc-kc-sbtn:hover,.opc-kc-tune .opc-kc-sbtn:focus{background:#ffedd5;color:#7c2d12}
.opc-kc-tempo{font-size:15px;color:var(--kc-ok);font-weight:700}
.opc-kc-tempo::before{content:"✓ "}

/* Step 3: export */
.opc-kc-fmt{margin:0 0 10px}
.opc-kc-dl{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:52px;padding:0 18px;border:0;border-radius:12px;background:var(--kc-blue);color:#fff;font-weight:800;font-size:17.5px}
.opc-kc-dl:hover,.opc-kc-dl:focus{background:var(--kc-blue2);color:#fff}
.opc-kc-dl:disabled{background:#cbd5e1;color:#334155}
.opc-kc-dl svg{width:22px;height:22px}
.opc-kc-dlinfo{margin-top:8px;font-size:15px;color:var(--kc-text);overflow-wrap:anywhere;min-height:2.9em}
.opc-kc-dlinfo b{color:var(--kc-navy)}
.opc-kc-savewrap{margin-top:8px}
.opc-kc-save{display:inline-flex;align-items:center;min-height:44px;font-weight:700;color:var(--kc-blue2);overflow-wrap:anywhere}
.opc-kc-share{margin-top:6px}

/* wider screens: studio layout */
@media (min-width:600px){
	.opc-kc-pk.is-white{margin-right:4px}
	.opc-kc-pk.is-black{left:calc((100% + 4px) / 7 * var(--opc-kc-x) - 24px);width:48px}
	.opc-kc-piano{height:156px}
	.opc-kc-facts{grid-template-columns:repeat(3,minmax(0,1fr))}
	.opc-kc-facts .opc-kc-factwide{grid-column:auto}
}
@media (min-width:880px){
	.opc-kc-title{font-size:28px}
	.opc-kc-grid{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);grid-template-areas:"drop song" "player player" "keys export";gap:14px}
	.opc-kc-drop{grid-area:drop;align-self:start}
	.opc-kc-song{grid-area:song}
	.opc-kc-player{grid-area:player}
	.opc-kc-keys{grid-area:keys}
	.opc-kc-export{grid-area:export;align-self:start}
	.opc-kc-droplabel{min-height:128px}
	.opc-kc-wave{height:128px}
	.opc-kc-card{padding:18px}
	.opc-kc-bigkey{font-size:37px}
}
@media (prefers-reduced-motion:reduce){.opc-kc *{transition:none!important;animation:none!important}}
/* narrow phones: the keyboard uses the full card width so every key stays ≥ 44 px wide */
@media (max-width:420px){
	.opc-kc-piano{margin:0 -9px 4px}
	.opc-kc-pk.is-white{margin-right:1px}
	.opc-kc-pk.is-black{left:calc((100% + 1px) / 7 * var(--opc-kc-x) - 22px)}
}
@media (max-width:340px){.opc-kc-pk.is-white{min-width:38px}.opc-kc-pk.is-black{width:36px;left:calc((100% + 1px) / 7 * var(--opc-kc-x) - 18px)}}
