
:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#f4f4f4;background:#0a0c0f}
*{box-sizing:border-box} body{margin:0;background:radial-gradient(circle at 30% 0,#20252c 0,#0b0d10 45%,#060708 100%);min-height:100vh}
header{height:92px;padding:14px 28px;border-bottom:1px solid #2c3036;display:flex;align-items:center;justify-content:space-between;background:#0c0f12e8;position:sticky;top:0;z-index:2}
.brand{display:flex;align-items:center;gap:15px}.brand img{display:none;max-height:62px;max-width:150px;object-fit:contain}.brand h1{margin:0;font-size:27px;letter-spacing:.04em}.sub,.tiny{color:#8f99a5;font-size:13px}
main{max-width:1580px;margin:24px auto;padding:0 24px}.card{background:#12161b;border:1px solid #303640;border-radius:18px;padding:28px;box-shadow:0 18px 50px #0007}
h2{font-size:34px;margin:0 0 8px}.lead{color:#aab2bc;margin:0 0 28px}label{display:block;font-weight:700;margin:24px 0 10px}
button,select,input{font:inherit}button{background:#1c2229;color:#fff;border:1px solid #3b444e;border-radius:10px;padding:13px 17px;cursor:pointer}
button:hover{border-color:#e14b3c}.chips{display:flex;gap:10px;flex-wrap:wrap}.chips button.active,.choice.active{background:#3a1715;border-color:#ef594a;box-shadow:inset 0 0 0 1px #ef594a}
.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.choice{text-align:left;padding:20px}.choice b,.choice span{display:block}.choice span{color:#99a3ae;margin-top:6px}
.primary{background:#df3e32;border-color:#ff6558;font-weight:800}.primary:hover{background:#ef4a3d}.ghost{background:transparent}.small{padding:9px 12px}
#beginBtn{width:100%;margin-top:30px;font-size:18px}.hidden{display:none}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px}
.status{margin:18px 0 10px;color:#98a2ad}canvas{width:100%;height:auto;background:#080a0d;border:1px solid #2d343d;border-radius:12px}
.controls{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.controls select{background:#181d23;color:#fff;border:1px solid #3b444e;border-radius:9px;padding:0 12px}
.assistant{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-top:20px;background:#0b0e11;border:1px solid #2d343d;border-radius:12px;padding:18px}.assistant h3{margin:0 0 5px}.assistant p{margin:0;color:#9ca6b0;max-width:720px}
dialog{background:#151a20;color:#fff;border:1px solid #424b55;border-radius:16px;width:min(560px,92vw);padding:25px}dialog::backdrop{background:#000a}
dialog input{width:100%;padding:12px;border-radius:8px;border:1px solid #3d4650;background:#0d1115;color:#fff}.preview{height:130px;margin-top:12px;border:1px dashed #414a55;border-radius:10px;display:flex;align-items:center;justify-content:center}.preview img{max-height:110px;max-width:90%}.dialogBtns{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
@media(max-width:700px){.two{grid-template-columns:1fr}.toolbar,.assistant{align-items:stretch;flex-direction:column}header{padding:12px 16px}.brand h1{font-size:20px}}

/* Full-screen tuning mode */
:fullscreen body{background:#060708}
:fullscreen header{height:78px}
:fullscreen main{max-width:none;margin:12px auto;padding:0 16px}
:fullscreen #rta{min-height:calc(100vh - 102px);padding:18px}
:fullscreen #scope{max-height:calc(100vh - 310px)}

.micPanel{margin:16px 0 10px;padding:12px 14px;background:#0b0e11;border:1px solid #2d343d;border-radius:12px}
.micPanel .status{margin:0 0 10px}
.calRow{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.inlineLabel{margin:0;font-size:13px;color:#aab2bc}
.calRow select{background:#181d23;color:#fff;border:1px solid #3b444e;border-radius:9px;padding:9px 11px}
.calButton{margin:0;background:#1c2229;color:#fff;border:1px solid #3b444e;border-radius:9px;padding:9px 12px;cursor:pointer;font-weight:700}
.calButton:hover{border-color:#ef594a}
.calStatus{margin-top:10px;font-size:13px}.calStatus.ok{color:#75d98b}.calStatus.warn{color:#f2bb62}.calStatus.bad{color:#ff7468}

.micSelect{background:#181d23;color:#fff;border:1px solid #3b444e;border-radius:9px;padding:9px 11px;max-width:260px}
.inputMeterWrap{display:grid;grid-template-columns:85px 1fr 90px;gap:10px;align-items:center;margin-top:12px;font-size:12px}
.meter{height:12px;background:#252b32;border-radius:20px;overflow:hidden}.meter div{height:100%;width:0;background:#ef594a;transition:width .08s linear}
#meterText{text-align:right}

.generator{margin-top:20px;background:#0b0e11;border:1px solid #2d343d;border-radius:12px;padding:18px}
.generator h3{margin:0 0 5px}.generator p{margin:0 0 14px;color:#9ca6b0}
.genControls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.genControls label{margin:0 0 0 8px;display:flex;align-items:center;gap:8px;font-size:13px}
.genControls input[type=range]{width:180px}.stopGen{border-color:#70403c}

.axisLabel{font:11px sans-serif}
.analysisResults{width:100%;margin-top:14px;border-top:1px solid #29313a;padding-top:12px}
.analysisResults.hidden{display:none}
.analysisTable{width:100%;border-collapse:collapse;font-size:13px}
.analysisTable th,.analysisTable td{padding:8px;border-bottom:1px solid #252c33;text-align:left}
.analysisTable th{color:#9faab5}.analysisGood{color:#75d98b}.analysisWarn{color:#f2bb62}

/* V0.11 wider shop workspace */
@media(min-width:1200px){
  #rta{padding:24px 28px}
  #scope{width:100%}
}

.songTarget{margin-top:20px;background:#0b0e11;border:1px solid #2d343d;border-radius:12px;padding:18px}
.songTarget h3{margin:0 0 5px}.songTarget p{margin:0 0 14px;color:#9ca6b0}
.songControls{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.songControls select{background:#181d23;color:#fff;border:1px solid #3b444e;border-radius:9px;padding:11px}
#songStatus{margin-top:10px}

.captureMeterWrap{margin-top:12px}.captureMeterWrap.hidden{display:none}
.captureMeta{display:flex;justify-content:space-between;font-size:11px;color:#b66cff;margin-bottom:6px;font-weight:700}
.captureMeter{height:8px;background:#1d232a;border-radius:6px;overflow:hidden}
#captureMeterFill{height:100%;width:0;background:#b66cff}

.savedTargetCard{display:flex;gap:10px;align-items:center;margin-top:12px;padding:10px 12px;background:#15101c;border:1px solid #704c8e;border-radius:9px;font-size:12px}
.savedTargetCard.hidden,.toast.hidden{display:none}.savedDot{width:10px;height:10px;border-radius:50%;background:#b66cff;box-shadow:0 0 10px #b66cff}
.toast{position:fixed;right:24px;bottom:24px;z-index:9999;background:#171d23;border:1px solid #b66cff;border-radius:10px;padding:14px 18px;color:#fff;box-shadow:0 8px 28px rgba(0,0,0,.45);font-weight:700}

.captureState{margin-top:14px;padding:10px 14px;border-radius:9px;text-align:center;font-weight:900;letter-spacing:.7px;font-size:13px}
.captureState.idle{background:#171b20;border:1px solid #343c45;color:#aab3bd}
.captureState.capturing{background:#20152a;border:1px solid #b66cff;color:#d8adff;animation:capturePulse .85s ease-in-out infinite alternate}
.captureState.stopped{background:#291414;border:1px solid #ff5a4f;color:#ff766d}
.captureState.saving{background:#28220f;border:1px solid #ffd24a;color:#ffe16e;animation:capturePulse .65s ease-in-out infinite alternate}
.captureState.saved{background:#10251a;border:1px solid #38e07b;color:#68ef9b}
@keyframes capturePulse{from{opacity:.55;box-shadow:none}to{opacity:1;box-shadow:0 0 16px currentColor}}

.songCount{text-align:center;margin:7px 0 4px;font-size:12px;font-weight:800;color:#d8adff}

.targetName{min-width:250px;background:#181d23;color:#fff;border:1px solid #3b444e;border-radius:9px;padding:11px}
.targetLibrary{margin-top:14px;border:1px solid #2d343d;border-radius:10px;padding:12px;background:#0e1216}
.targetLibraryHead{display:flex;justify-content:space-between;color:#aab3bd;font-size:12px;margin-bottom:8px}
.targetLibraryList{display:grid;gap:7px}
.targetItem{display:flex;align-items:center;gap:9px;padding:9px;background:#151a20;border-radius:8px;border:1px solid #29313a}
.targetItem .swatch{width:12px;height:12px;border-radius:50%;flex:none}
.targetItem .name{flex:1;font-weight:700}.targetItem .meta{font-size:10px;color:#8e99a4}
.targetItem button{padding:7px 9px;font-size:11px}

#activeTargetSelect{max-width:260px}
#targetHelpBtn{border-color:#6b4b85}
.targetGuide{margin-top:12px;padding:14px;border:1px solid #3b4650;border-radius:10px;background:#0e1216}
.targetGuide.hidden{display:none}
.guideHead{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}
.guideTargetName{font-weight:900}.guideRows{display:grid;gap:6px}
.guideRow{display:grid;grid-template-columns:90px 90px 1fr;gap:10px;padding:7px 9px;background:#151a20;border-radius:7px;font-size:12px}
.guideCut{color:#ff766d}.guideBoost{color:#68ef9b}.guideOk{color:#aab3bd}

.boostWarning{margin:10px 0;padding:11px 13px;border-radius:9px;background:#261c0d;border:1px solid #d39b35;color:#ffd980;font-size:12px;line-height:1.45}
.boostDanger{color:#ff766d;font-weight:900}

.setupHelp{margin-top:12px;padding:14px;border:1px solid #303842;border-radius:10px;background:#0d1115}
.setupHelpTitle{font-weight:900;margin-bottom:9px;color:#e4e9ee}
.setupHelpGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.setupHelpGrid>div{padding:10px;background:#151a20;border-radius:8px;color:#9fa9b3;font-size:12px;line-height:1.45}
.setupHelpGrid b{color:#fff}.recommended{font-size:9px;color:#68ef9b;border:1px solid #317f4e;border-radius:10px;padding:2px 6px;margin-left:4px}
.defaultAdvice{margin-top:10px;padding:9px;text-align:center;background:#10251a;border:1px solid #286f45;border-radius:8px;color:#7aefa3;font-size:12px}
@media(max-width:800px){.setupHelpGrid{grid-template-columns:1fr}}

.rtaSpeedControl{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:800;color:#aeb7c0}
.rtaSpeedControl select{min-width:78px}

.tuningStyleLabel{display:flex;align-items:center;gap:8px;margin-top:14px}
.tuningStyleLabel label{margin:0}
.miniInfoBtn{width:28px;height:28px;min-width:28px;padding:0!important;border-radius:50%!important;font-size:16px!important;line-height:1!important}
.styleHelpModal{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.76);display:flex;align-items:center;justify-content:center;padding:20px}
.styleHelpModal.hidden{display:none}
.styleHelpCard{width:min(620px,94vw);background:#11161b;border:1px solid #3b4650;border-radius:14px;padding:20px;box-shadow:0 20px 70px rgba(0,0,0,.6)}
.styleHelpHead{display:flex;align-items:center;justify-content:space-between;gap:16px}
.styleHelpHead h2{margin:0}
.styleHelpHead button{padding:7px 11px}
.styleHelpLead{color:#aab3bd;margin:6px 0 14px}
.styleHelpOption{margin-top:8px;padding:12px;background:#181d23;border:1px solid #2c343d;border-radius:9px}
.styleHelpOption b{display:block;margin-bottom:4px;color:#fff}
.styleHelpOption span{font-size:12px;line-height:1.45;color:#aab3bd}
.styleHelpOption small{margin-left:6px;color:#68ef9b;border:1px solid #317f4e;border-radius:10px;padding:2px 6px}
.recommendedOption{border-color:#317f4e}
.styleHelpAdvice{margin-top:12px;padding:10px;text-align:center;background:#10251a;border:1px solid #286f45;border-radius:8px;color:#7aefa3;font-size:12px}

.micPlacementHint{font-size:11px;color:#9fa9b3;font-weight:500}

#holdBtn.activeHold{border-color:#ffd24a!important;color:#ffd24a!important;box-shadow:0 0 0 1px rgba(255,210,74,.25) inset}

.rtaTypeControl{display:flex;flex-direction:column;gap:4px;font-size:11px;font-weight:800;color:#aeb7c0}
.rtaTypeControl select{min-width:92px}

.brandingBackground{margin:14px 0;padding:12px;border:1px solid #303842;border-radius:10px;background:rgba(13,17,21,.88)}
.brandingBgTitle{margin-bottom:8px;font-size:12px;font-weight:900;color:#e4e9ee}
.brandingBgRow{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
#shopBgColor{width:48px;height:38px;padding:2px;border-radius:7px;background:#151a20;border:1px solid #3b4650}
.uploadBgBtn{display:inline-flex;align-items:center;justify-content:center;padding:10px 12px;border:1px solid #3b4650;border-radius:8px;background:#181d23;color:#fff;font-size:11px;font-weight:800;cursor:pointer}
.uploadBgBtn input{display:none}
body.shopCustomBg{background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important;background-attachment:fixed!important}
body.shopCustomBg::before{content:"";position:fixed;inset:0;z-index:-1;background:rgba(0,0,0,.48);pointer-events:none}

.brandOption{margin-top:14px;padding-top:12px;border-top:1px solid #303842}
.brandOption>label{display:block;margin-bottom:7px;font-size:12px;font-weight:800}
.brandInline{display:flex;align-items:center;gap:10px}
#topBarColor{width:52px;height:38px;padding:2px;border:1px solid #3b4650;border-radius:7px;background:#151a20}
#shopNameFont{width:100%}
.fontPreview{margin-top:8px;padding:9px 11px;background:#0c1014;border:1px solid #2c343d;border-radius:8px;font-size:19px}
.shopFont-system{font-family:Arial,Helvetica,sans-serif}
.shopFont-bold{font-family:Arial,Helvetica,sans-serif;font-weight:900}
.shopFont-condensed{font-family:"Arial Narrow","Roboto Condensed",Arial,sans-serif;font-stretch:condensed;font-weight:800}
.shopFont-serif{font-family:Georgia,"Times New Roman",serif}
.shopFont-mono{font-family:"Courier New",monospace;font-weight:700}
.shopFont-cursive{font-family:"Brush Script MT","Segoe Script",cursive}

/* V0.46: keep Shop Settings out of the main setup flow and pin it upper-right. */
.shopSettingsBtn{
  position:fixed!important;
  top:14px!important;
  right:18px!important;
  z-index:9000!important;
  width:auto!important;
  margin:0!important;
  padding:9px 13px!important;
  background:#11161b!important;
  border:1px solid #3b4650!important;
  box-shadow:0 4px 16px rgba(0,0,0,.35);
}
@media(max-width:700px){
  .shopSettingsBtn{top:8px!important;right:8px!important;padding:8px 10px!important;font-size:10px!important}
}

/* V0.49 Shop Settings repair */
#branding{
  position:fixed!important;
  inset:50% auto auto 50%!important;
  transform:translate(-50%,-50%)!important;
  width:min(620px,92vw)!important;
  max-width:620px!important;
  max-height:88vh!important;
  overflow:auto!important;
  margin:0!important;
  padding:24px!important;
  box-sizing:border-box!important;
}
#branding::backdrop{background:rgba(0,0,0,.72)}
.dialogCloseX{
  position:absolute!important;
  top:12px!important;
  right:12px!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  padding:0!important;
  border-radius:8px!important;
  font-size:18px!important;
  z-index:2!important;
}
#branding .brandOption{display:block!important;width:100%!important;margin:14px 0 0!important;padding:12px 0 0!important;border-top:1px solid #303842}
#branding .brandInline{display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important}
#branding #saveBranding{display:block!important;width:100%!important;margin-top:18px!important;min-height:48px!important}
#branding button[value="cancel"]{width:auto!important;min-height:40px!important}
#branding .fontPreview{max-width:100%!important;box-sizing:border-box!important}
#mainBgColor,#topBarColor{width:52px!important;height:38px!important;flex:0 0 52px!important}
#shopNameFont{width:100%!important;max-width:100%!important}

.uploadBgBtn{display:inline-flex;align-items:center;justify-content:center;padding:10px 12px;border:1px solid #3b4650;border-radius:8px;background:#181d23;color:#fff;font-size:11px;font-weight:800;cursor:pointer}
.uploadBgBtn input{display:none}.optionalText{font-size:9px;color:#9aa5af;margin-left:5px}
#shopNameFont{width:100%!important;box-sizing:border-box}

/* V0.51 clean, compact second-page RTA toolbar */
#controls{
  display:flex!important;
  align-items:flex-end!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
#controls button,
#controls select{
  box-sizing:border-box!important;
}
#controls > button{
  min-height:44px!important;
  height:44px!important;
  padding:0 14px!important;
  margin:0!important;
}
#controls #startBtn{
  min-width:132px!important;
}
#controls .rtaActionBtn{
  min-width:78px!important;
}
.rtaToolControl{
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-end!important;
  gap:5px!important;
  margin:0!important;
  font-size:10px!important;
  font-weight:800!important;
  color:#aeb7c0!important;
  line-height:1!important;
}
.rtaToolControl>span{
  display:block!important;
  min-height:11px!important;
  white-space:nowrap!important;
}
.rtaToolControl select{
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0 34px 0 12px!important;
  font-size:12px!important;
  border-radius:8px!important;
}
.rtaTypeControl select{width:112px!important;min-width:112px!important}
.targetSongControl select{width:240px!important;min-width:240px!important}
.targetPositionControl select{width:160px!important;min-width:160px!important}
.rtaSpeedControl select{width:110px!important;min-width:110px!important}
.smoothingControl select{width:175px!important;min-width:175px!important}

/* The target-curve selector below the old toolbar gets the same visual rhythm. */
#targetCurve{
  height:38px!important;
  min-height:38px!important;
  border-radius:8px!important;
  padding:0 32px 0 12px!important;
  font-size:12px!important;
}
@media(max-width:900px){
  #controls{align-items:flex-end!important}
  .targetSongControl select{width:210px!important;min-width:210px!important}
}

/* V0.53: utility actions live at the far-right end of the RTA toolbar. */
#controls .toolbarEndBtn{
  height:44px!important;
  min-height:44px!important;
  padding:0 13px!important;
  margin:0!important;
  border-radius:8px!important;
  white-space:nowrap!important;
  align-self:flex-end!important;
}
#controls .lockScaleEnd{
  margin-left:auto!important;
}
#controls .helpTargetEnd{
  min-width:185px!important;
}
@media(max-width:1100px){
  #controls .lockScaleEnd{margin-left:0!important}
}

/* V0.54: give Target Curve Line enough room for full option text. */
.targetPositionControl{
  flex:0 0 auto!important;
}
.targetPositionControl select{
  width:190px!important;
  min-width:190px!important;
  max-width:none!important;
  padding-right:38px!important;
  text-overflow:clip!important;
}

/* V0.56 - actual live RTA toolbar uses .controls (not #controls). */
.controls{
  display:grid!important;
  grid-template-columns:126px 82px 82px 112px minmax(210px,1.35fr) 150px 190px 210px;
  gap:8px!important;
  align-items:end!important;
  width:100%!important;
}
.controls > *{margin:0!important;min-width:0!important;box-sizing:border-box!important}
.controls > button{
  height:44px!important;
  min-height:44px!important;
  padding:0 12px!important;
  border-radius:8px!important;
}
.controls .rtaToolControl{
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  min-width:0!important;
  font-size:10px!important;
  font-weight:800!important;
  color:#aeb7c0!important;
  line-height:1!important;
}
.controls .rtaToolControl>span{height:12px!important;white-space:nowrap!important}
.controls .rtaToolControl select,
.controls .rtaToolControl button{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0 34px 0 12px!important;
  border-radius:8px!important;
  box-sizing:border-box!important;
  font-size:12px!important;
  white-space:nowrap!important;
}
.controls .helpControl button{padding:0 12px!important}
.controls .curveStyleControl{grid-column:1 / span 2}
.controls .rtaSpeedControl{grid-column:3}
.controls .smoothingControl{grid-column:4 / span 2}
.controls .scaleControl{grid-column:6}
.controls .helpControl{grid-column:7 / span 2}
@media(max-width:1250px){
  .controls{grid-template-columns:repeat(4,minmax(150px,1fr))}
  .controls>#startBtn,.controls>#holdBtn,.controls>#clearBtn{width:100%!important}
  .controls .curveStyleControl,.controls .rtaSpeedControl,.controls .smoothingControl,.controls .scaleControl,.controls .helpControl{grid-column:auto}
}

/* V0.56 Shop Settings: roomy, clean, one setting per row. */
#branding{
  width:min(760px,94vw)!important;
  max-width:760px!important;
  max-height:90vh!important;
  padding:28px!important;
}
#branding form{display:block!important}
#branding h2{font-size:30px!important;margin:0 48px 24px 0!important}
#branding .dialogBtns{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:0!important;
  width:100%!important;
}
#branding .dialogBtns>button[value="cancel"]{
  order:99!important;
  width:100%!important;
  margin-top:10px!important;
}
#branding .brandOption{
  width:100%!important;
  display:block!important;
  margin-top:16px!important;
  padding-top:16px!important;
}
#branding .brandInline{display:flex!important;align-items:center!important;gap:12px!important;flex-wrap:wrap!important}
#branding #saveBranding{width:100%!important;height:52px!important;margin-top:20px!important}
#branding .preview{min-height:130px!important}
#branding .fontPreview{font-size:24px!important;min-height:58px!important;display:flex!important;align-items:center!important}
.fontLoadRow{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}
#loadPcFonts{height:40px!important;padding:0 12px!important}

/* V0.57 real font picker */
#shopNameFont,#manualShopFont{width:100%!important;box-sizing:border-box!important;height:42px!important}
#manualShopFont{margin-top:8px!important}

/* V0.58 - tighten the live RTA menu into two deliberate rows.
   Row 1 = live controls + target controls + utilities.
   Row 2 = display/tuning options, packed left with no dead space. */
.controls{
  display:grid!important;
  grid-template-columns:126px 82px 82px 112px minmax(280px,1fr) 215px 145px 210px!important;
  grid-template-areas:
    "live hold clear type curve line scale help"
    "style speed smooth smooth . . . ."!important;
  column-gap:8px!important;
  row-gap:10px!important;
  align-items:end!important;
  width:100%!important;
}
.controls > *{margin:0!important;min-width:0!important}
.controls #startBtn{grid-area:live!important}
.controls #holdBtn{grid-area:hold!important}
.controls #clearBtn{grid-area:clear!important}
.controls .rtaTypeControl{grid-area:type!important}
.controls .targetSongControl{grid-area:curve!important}
.controls .targetPositionControl{grid-area:line!important}
.controls .scaleControl{grid-area:scale!important}
.controls .helpControl{grid-area:help!important}
.controls .curveStyleControl{grid-area:style!important}
.controls .rtaSpeedControl{grid-area:speed!important}
.controls .smoothingControl{grid-area:smooth!important}

.controls > button,
.controls .rtaToolControl select,
.controls .rtaToolControl button{
  height:44px!important;
  min-height:44px!important;
  max-height:44px!important;
  box-sizing:border-box!important;
  border-radius:8px!important;
  margin:0!important;
}
.controls .rtaToolControl{
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  width:100%!important;
  min-width:0!important;
  align-self:end!important;
}
.controls .rtaToolControl>span{
  display:block!important;
  height:12px!important;
  min-height:12px!important;
  line-height:12px!important;
  margin:0!important;
  white-space:nowrap!important;
}
.controls .rtaToolControl select{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  padding:0 32px 0 12px!important;
  text-overflow:clip!important;
}
.controls .targetPositionControl select{
  width:100%!important;
  min-width:215px!important;
}
.controls .helpControl button{
  width:100%!important;
  padding:0 10px!important;
  white-space:nowrap!important;
}
.controls .scaleControl select{width:100%!important}
.controls .curveStyleControl select{width:100%!important}
.controls .rtaSpeedControl select{width:100%!important}
.controls .smoothingControl select{width:100%!important}

/* Keep the second row compact instead of stretching its controls across the screen. */
.controls .curveStyleControl{width:220px!important}
.controls .rtaSpeedControl{width:110px!important}
.controls .smoothingControl{width:270px!important}

/* Responsive fallback: still orderly, never the scattered layout. */
@media(max-width:1200px){
  .controls{
    grid-template-columns:126px 82px 82px repeat(3,minmax(150px,1fr))!important;
    grid-template-areas:
      "live hold clear type curve curve"
      "line scale help help style speed"
      "smooth smooth smooth . . ."!important;
  }
  .controls .curveStyleControl,
  .controls .rtaSpeedControl,
  .controls .smoothingControl{width:100%!important}
}

/* V0.59 Photoshop/Word-style visual font picker */
.fontPicker{position:relative;width:100%}
.fontPickerBtn{
  width:100%!important;height:48px!important;display:flex!important;
  align-items:center!important;justify-content:space-between!important;
  padding:0 12px!important;text-align:left!important
}
#fontPickerPreview{font-size:21px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fontPickerArrow{font-family:Arial,sans-serif!important;font-size:11px}
.fontPickerMenu{
  position:absolute;left:0;right:0;top:52px;z-index:10050;
  background:#10151a;border:1px solid #46515d;border-radius:9px;
  box-shadow:0 12px 30px rgba(0,0,0,.55);padding:8px;
}
#fontSearch{
  width:100%!important;height:40px!important;box-sizing:border-box!important;
  margin:0 0 7px!important;padding:0 10px!important
}
.fontPreviewList{max-height:360px;overflow-y:auto}
.fontPreviewItem{
  width:100%;display:flex;align-items:center;justify-content:space-between;
  gap:12px;padding:9px 10px;border:0;border-bottom:1px solid #252d35;
  background:transparent;color:#fff;cursor:pointer;text-align:left
}
.fontPreviewItem:hover,.fontPreviewItem.selected{background:#202832}
.fontPreviewSample{font-size:22px;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fontPreviewName{font-family:Arial,sans-serif!important;font-size:10px;color:#9eabb7;flex:0 0 170px;text-align:right}

/* V0.60 - fix second-row collision.
   V0.59 put Target Style into a 126px grid cell but forced the control to 220px,
   so it physically ran underneath RTA Speed. Give each control real grid space. */
.controls{
  grid-template-areas:
    "live hold clear type curve line scale help"
    "style style speed smooth smooth . . ."!important;
}
.controls .curveStyleControl{
  grid-area:style!important;
  width:100%!important;
  min-width:0!important;
}
.controls .rtaSpeedControl{
  grid-area:speed!important;
  width:100%!important;
  min-width:0!important;
}
.controls .smoothingControl{
  grid-area:smooth!important;
  width:100%!important;
  min-width:0!important;
}
.controls .curveStyleControl select,
.controls .rtaSpeedControl select,
.controls .smoothingControl select{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
}
.controls .curveStyleControl select{
  padding-right:34px!important;
  font-size:11px!important;
}

/* Keep Target Style text readable instead of clipping PURPLE. */
@media(min-width:1201px){
  .controls{
    grid-template-columns:126px 82px 82px 112px minmax(280px,1fr) 215px 145px 210px!important;
  }
}

/* V0.61 reliable visual font browser */
.fontBrowserV61[hidden]{display:none!important}
.fontBrowserV61{
  position:fixed;inset:0;z-index:20000;
  display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.76);padding:24px;box-sizing:border-box
}
.fontBrowserPanelV61{
  width:min(780px,94vw);height:min(720px,88vh);
  display:flex;flex-direction:column;
  background:#141a20;border:1px solid #46515d;border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,.65);padding:18px;box-sizing:border-box
}
.fontBrowserHeadV61{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:12px}
.fontBrowserTitleV61{font-size:24px;font-weight:900;color:#fff}
.fontBrowserCloseV61{
  width:42px!important;height:42px!important;min-width:42px!important;
  padding:0!important;font-size:20px!important;border-radius:8px!important
}
#fontSearchV61{width:100%!important;height:44px!important;box-sizing:border-box!important;margin-bottom:10px!important}
.fontRowsV61{flex:1;overflow-y:auto;border:1px solid #2c353e;border-radius:9px}
.fontRowV61{
  width:100%;min-height:62px;display:grid;grid-template-columns:1fr 220px;
  align-items:center;gap:15px;padding:8px 12px;
  border:0;border-bottom:1px solid #29323a;background:#10151a;color:#fff;text-align:left;cursor:pointer
}
.fontRowV61:hover,.fontRowV61.selected{background:#222b34}
.fontSampleV61{font-size:25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fontNameV61{font-family:Arial,sans-serif!important;font-size:12px;color:#aeb9c4;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#browsePcFonts{height:40px!important;padding:0 12px!important}

/* V0.62 clean Shop Settings */
.brandingV62{width:min(820px,94vw)!important;max-width:820px!important;max-height:90vh!important;padding:0!important;overflow:hidden!important}
.brandingV62::backdrop{background:rgba(0,0,0,.72)}
.brandingHeadV62{display:flex;justify-content:space-between;align-items:flex-start;padding:22px 24px 16px;border-bottom:1px solid #313a43}
.brandingHeadV62 h2{margin:0 0 4px!important;font-size:28px!important}
.brandingBodyV62{padding:18px 24px;max-height:65vh;overflow-y:auto}
.brandCardV62{padding:14px 0;border-bottom:1px solid #2b333b}
.brandCardV62>label{display:block;margin-bottom:8px;font-weight:800}
.brandCardV62 input[type=text],.brandCardV62 select{width:100%!important;box-sizing:border-box!important;height:44px!important}
.twoColV62{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.fontActionsV62{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.brandingFootV62{display:grid;grid-template-columns:140px 1fr;gap:10px;padding:16px 24px 22px;border-top:1px solid #313a43}
.brandingFootV62 button{height:48px!important}
.dialogCloseX{position:static!important;width:42px!important;height:42px!important;min-width:42px!important;padding:0!important;font-size:20px!important}
.fontBrowserV62[hidden]{display:none!important}
.fontBrowserV62{position:fixed;inset:0;z-index:30000;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.78);padding:24px}
.fontBrowserPanelV62{width:min(800px,94vw);height:min(720px,88vh);display:flex;flex-direction:column;background:#141a20;border:1px solid #46515d;border-radius:14px;padding:18px;box-sizing:border-box}
.fontBrowserHeadV62{display:flex;justify-content:space-between;gap:12px;margin-bottom:12px}
.fontBrowserTitleV62{font-size:24px;font-weight:900}
.fontBrowserCloseV62{width:42px!important;height:42px!important;min-width:42px!important;padding:0!important;font-size:20px!important}
#fontSearchV62{height:44px!important;width:100%!important;box-sizing:border-box!important;margin-bottom:10px!important}
.fontRowsV62{flex:1;overflow:auto;border:1px solid #2c353e;border-radius:9px}
.fontRowV62{width:100%;min-height:64px;display:grid;grid-template-columns:1fr 220px;align-items:center;gap:14px;padding:8px 12px;border:0;border-bottom:1px solid #29323a;background:#10151a;color:#fff;text-align:left;cursor:pointer}
.fontRowV62:hover,.fontRowV62.selected{background:#222b34}
.fontSampleV62{font-size:25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fontNameV62{font-family:Arial,sans-serif!important;font-size:12px;color:#aeb9c4;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* V0.63: Font previews live INSIDE Shop Settings, never behind the dialog. */
#branding #fontBrowserV62[hidden]{display:none!important}
#branding #fontBrowserV62{
  position:absolute!important;
  inset:0!important;
  z-index:50!important;
  display:flex!important;
  align-items:stretch!important;
  justify-content:stretch!important;
  background:#11171d!important;
  padding:0!important;
  box-sizing:border-box!important;
  border-radius:inherit!important;
}
#branding #fontBrowserV62 .fontBrowserPanelV62{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  padding:22px!important;
}
#branding #fontBrowserV62 .fontBrowserHeadV62{
  flex:0 0 auto!important;
}
#branding #fontBrowserV62 .fontRowsV62{
  min-height:0!important;
}

/* V0.64: Lock Scale goes at the absolute end of the RTA toolbar.
   Give it enough width so LOCK SCALE / AUTO SCALE are never clipped. */
.controls{
  grid-template-areas:
    "live hold clear type curve line help scale"
    "style style speed smooth smooth . . ."!important;
}
.controls .helpControl{grid-area:help!important}
.controls .scaleControl{
  grid-area:scale!important;
  min-width:165px!important;
}
.controls .scaleControl select{
  width:100%!important;
  min-width:165px!important;
  padding-left:12px!important;
  padding-right:32px!important;
  font-size:11px!important;
  text-overflow:clip!important;
}
@media(max-width:1200px){
  .controls{
    grid-template-areas:
      "live hold clear type curve curve"
      "line help help scale style speed"
      "smooth smooth smooth . . ."!important;
  }
}

/* V0.65: correct Lock Scale placement.
   Top row ends with Target Help.
   Second row is Target Style | RTA Speed | Smoothing | Scale. */
.controls{
  grid-template-areas:
    "live hold clear type curve line help help"
    "style style speed smooth smooth scale scale scale"!important;
}
.controls .helpControl{
  grid-area:help!important;
}
.controls .scaleControl{
  grid-area:scale!important;
  width:100%!important;
  min-width:0!important;
}
.controls .scaleControl select{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  padding-left:12px!important;
  padding-right:34px!important;
  font-size:12px!important;
  text-overflow:clip!important;
}
@media(max-width:1200px){
  .controls{
    grid-template-areas:
      "live hold clear type curve curve"
      "line help help help . ."
      "style style speed smooth smooth scale"!important;
  }
}

/* V0.66: make second-page RTA toolbar headings easier to read. */
.controls .rtaToolControl > span{
  font-size:12px!important;
  font-weight:800!important;
  line-height:14px!important;
  height:14px!important;
  min-height:14px!important;
  letter-spacing:.15px!important;
}

/* V0.67: rebalance second-row widths.
   RTA Speed gets more room so MED AVG is fully visible.
   Lock Scale is compact since its text doesn't need a huge box. */
.controls{
  grid-template-areas:
    "live hold clear type curve line help help"
    "style style speed speed smooth smooth scale ."!important;
}
.controls .rtaSpeedControl{
  grid-area:speed!important;
  width:100%!important;
  min-width:150px!important;
}
.controls .rtaSpeedControl select{
  width:100%!important;
  min-width:150px!important;
  padding-left:12px!important;
  padding-right:34px!important;
  text-overflow:clip!important;
}
.controls .scaleControl{
  grid-area:scale!important;
  width:135px!important;
  min-width:135px!important;
  max-width:135px!important;
}
.controls .scaleControl select{
  width:135px!important;
  min-width:135px!important;
  max-width:135px!important;
  padding-left:10px!important;
  padding-right:28px!important;
  font-size:11px!important;
}
@media(max-width:1200px){
  .controls{
    grid-template-areas:
      "live hold clear type curve curve"
      "line help help help . ."
      "style style speed speed smooth scale"!important;
  }
}

/* V0.68: tiny final Scale width adjustment so LOCK SCALE shows completely. */
.controls .scaleControl{
  width:150px!important;
  min-width:150px!important;
  max-width:150px!important;
}
.controls .scaleControl select{
  width:150px!important;
  min-width:150px!important;
  max-width:150px!important;
  padding-left:10px!important;
  padding-right:28px!important;
}

/* V0.69 - final toolbar width cleanup based on screenshot.
   Give text-heavy controls enough real estate and keep the compact two-row look. */
@media(min-width:1201px){
  .controls{
    grid-template-columns:
      126px   /* Live */
      82px    /* Hold */
      82px    /* Clear */
      112px   /* RTA Type */
      minmax(300px,1fr) /* Target Curve */
      215px   /* Target Curve Line */
      175px   /* Help part 1 */
      175px   /* Help part 2 */
      !important;
    grid-template-areas:
      "live hold clear type curve line help help"
      "style style speed speed smooth smooth scale ."!important;
  }

  /* Target Style was clipping PURPLE. */
  .controls .curveStyleControl{
    width:100%!important;
    min-width:220px!important;
  }
  .controls .curveStyleControl select{
    width:100%!important;
    min-width:220px!important;
    padding-left:12px!important;
    padding-right:32px!important;
    font-size:11px!important;
  }

  /* RTA Speed now has plenty of room for SLOW / MED / FAST. */
  .controls .rtaSpeedControl{
    width:100%!important;
    min-width:160px!important;
  }
  .controls .rtaSpeedControl select{
    width:100%!important;
    min-width:160px!important;
    padding-left:12px!important;
    padding-right:32px!important;
  }

  /* Smoothing remains the widest second-row control. */
  .controls .smoothingControl{
    width:100%!important;
    min-width:300px!important;
  }
  .controls .smoothingControl select{
    width:100%!important;
    min-width:300px!important;
    padding-left:12px!important;
    padding-right:34px!important;
  }

  /* Scale only needs enough room for the complete words. */
  .controls .scaleControl{
    width:155px!important;
    min-width:155px!important;
    max-width:155px!important;
  }
  .controls .scaleControl select{
    width:155px!important;
    min-width:155px!important;
    max-width:155px!important;
    padding-left:10px!important;
    padding-right:30px!important;
    font-size:11px!important;
  }
}

/* Don't let native select text disappear under its arrow. */
.controls select{
  box-sizing:border-box!important;
  white-space:nowrap!important;
}

/* V0.70 - make Target Style and RTA Speed deliberately wide enough.
   Stop relying on inherited grid widths for these two controls. */
@media(min-width:1201px){
  .controls{
    grid-template-columns:
      126px 82px 82px 112px minmax(300px,1fr) 215px 175px 175px!important;
    grid-template-areas:
      "live hold clear type curve line help help"
      "style style style speed speed smooth scale ."!important;
  }

  .controls .curveStyleControl{
    grid-area:style!important;
    width:100%!important;
    min-width:300px!important;
    max-width:none!important;
  }
  .controls .curveStyleControl select{
    width:100%!important;
    min-width:300px!important;
    max-width:none!important;
    padding:0 36px 0 14px!important;
    font-size:12px!important;
  }

  .controls .rtaSpeedControl{
    grid-area:speed!important;
    width:100%!important;
    min-width:190px!important;
    max-width:none!important;
  }
  .controls .rtaSpeedControl select{
    width:100%!important;
    min-width:190px!important;
    max-width:none!important;
    padding:0 36px 0 14px!important;
    font-size:12px!important;
  }

  .controls .smoothingControl{
    grid-area:smooth!important;
    width:100%!important;
    min-width:250px!important;
  }

  .controls .scaleControl{
    grid-area:scale!important;
    width:155px!important;
    min-width:155px!important;
    max-width:155px!important;
  }
}

/* V0.71 PORT CALCULATOR - isolated UI */
.headerActions{display:flex;gap:8px;align-items:center}
.portCalcDialog{width:min(980px,95vw);max-width:980px;max-height:92vh;padding:0!important;overflow:hidden!important}
.portCalcDialog::backdrop{background:rgba(0,0,0,.76)}
.portCalcHead{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:20px 24px 16px;border-bottom:1px solid #303941}
.portCalcHead h2{margin:0 0 4px;font-size:27px}
.portCalcBody{padding:20px 24px 24px;max-height:78vh;overflow:auto}
.portCalcGrid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.portCalcCard{background:#10161b;border:1px solid #303941;border-radius:12px;padding:18px}
.portCalcCard h3{margin:0 0 16px;font-size:19px}
.portCalcCard>label{display:block;margin:13px 0 6px;font-size:12px;font-weight:800;color:#c7d0d8}
.portCalcCard input,.portCalcCard select{height:44px;box-sizing:border-box}
.portCalcCard>select,.portCalcCard>input{width:100%}
.inputUnitRow{display:grid;grid-template-columns:1fr 110px;gap:8px}
.inputUnitRow.singleUnit{grid-template-columns:1fr 58px}
.inputUnitRow.singleUnit>span{height:44px;display:flex;align-items:center;justify-content:center;background:#1a2229;border:1px solid #3a454f;border-radius:8px;font-weight:800}
.portTypeButtons{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.portTypeButtons button.active{border-color:#44d07b;box-shadow:inset 0 0 0 1px #44d07b;color:#fff}
.portCalcGo{width:100%;height:48px;margin-top:20px}
.portResults{margin-top:18px;border:1px solid #39444e;border-radius:12px;overflow:hidden;background:#0e1419}
.portResultHero{text-align:center;padding:18px;background:#151d23}
.portResultHero span{display:block;font-size:11px;font-weight:900;color:#9eabb7;letter-spacing:.8px}
.portResultHero strong{display:block;font-size:40px;line-height:1.05;margin:5px 0}
.portResultHero small{color:#aeb8c1}
.portResultStats{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid #303941}
.portResultStats>div{padding:14px;border-right:1px solid #303941;text-align:center}
.portResultStats>div:last-child{border-right:0}
.portResultStats span{display:block;font-size:10px;color:#98a5af;margin-bottom:5px}
.portResultStats b{font-size:15px}
.portCalcWarning{padding:12px 16px;font-size:12px;line-height:1.55;color:#ffd36a;border-top:1px solid #303941}
.portCalcFootnote{padding:12px 16px 16px;border-top:1px solid #252d34;line-height:1.5}
@media(max-width:760px){
  .portCalcGrid{grid-template-columns:1fr}
  .portResultStats{grid-template-columns:1fr 1fr}
  .headerActions{flex-wrap:wrap;justify-content:flex-end}
}

/* V1.11 header tool correction */
.headerToolsV111{
  margin-left:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
  position:relative!important;
  z-index:100!important;
}
.headerToolsV111 > button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:max-content!important;
  white-space:nowrap!important;
}
.portCalcHeaderBtn{
  min-width:170px!important;
}
@media(max-width:760px){
  .headerToolsV111{
    flex-wrap:wrap!important;
  }
}

/* V1.12 - Port Calculator belongs on the FIRST PAGE, not stacked in header. */
.headerActions{
  margin-left:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
}
.headerActions #settingsBtn{
  position:static!important;
  inset:auto!important;
  margin:0!important;
  transform:none!important;
  white-space:nowrap!important;
}

/* Neutralize the temporary V1.11 header layout if cached rules are present. */
.headerToolsV111{display:contents!important}

.setupToolsV112{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:18px 0 12px;
  padding:13px 14px;
  border:1px solid #303941;
  border-radius:10px;
  background:#10161b;
}
.setupToolsText{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.setupToolsText strong{
  font-size:12px;
  letter-spacing:.5px;
}
.setupToolsText span{
  font-size:11px;
  color:#9eabb7;
}
.setupPortCalcBtn{
  min-width:190px!important;
  width:auto!important;
  white-space:nowrap!important;
  flex:0 0 auto!important;
}
@media(max-width:700px){
  .setupToolsV112{
    align-items:stretch;
    flex-direction:column;
  }
  .setupPortCalcBtn{width:100%!important}
}

/* V1.13 - Real app landing page: choose RTA or Port Calculator */
.homeChoiceV113{
  width:100%;
  padding:54px 20px 70px;
  box-sizing:border-box;
}
.homeChoiceInnerV113{
  width:min(980px,100%);
  margin:0 auto;
  text-align:center;
}
.homeChoiceEyebrow{
  font-size:11px;
  font-weight:900;
  letter-spacing:1.6px;
  color:#9eabb7;
  margin-bottom:8px;
}
.homeChoiceV113 h1{
  margin:0;
  font-size:36px;
}
.homeChoiceV113 p{
  color:#aab4bd;
  margin:8px 0 28px;
}
.homeChoiceCardsV113{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}
.homeChoiceCardV113{
  min-height:245px;
  padding:26px;
  border:1px solid #39444e;
  border-radius:14px;
  background:#11181e;
  color:#fff;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  text-align:left;
  cursor:pointer;
  transition:.16s ease;
}
.homeChoiceCardV113:hover{
  transform:translateY(-2px);
  border-color:#ed4438;
  box-shadow:0 10px 30px rgba(0,0,0,.28);
}
.homeChoiceIconV113{
  font-size:35px;
  margin-bottom:18px;
}
.homeChoiceCardV113 strong{
  font-size:23px;
  margin-bottom:8px;
}
.homeChoiceCardV113 small{
  color:#aab4bd;
  font-size:13px;
  line-height:1.55;
  flex:1;
}
.homeChoiceCardV113 b{
  margin-top:22px;
  font-size:12px;
  color:#fff;
}
.stageBackRowV113{
  width:min(1040px,calc(100% - 24px));
  margin:12px auto 0;
  display:flex;
  justify-content:flex-start;
}
#rtaSetupStageV113[hidden],
#homeChoiceV113[hidden]{
  display:none!important;
}
@media(max-width:720px){
  .homeChoiceCardsV113{grid-template-columns:1fr}
  .homeChoiceV113{padding-top:28px}
  .homeChoiceV113 h1{font-size:29px}
}

/* V1.15 SAFE MAIN MENU
   Overlay the working V1.13 app instead of hiding its internal RTA containers. */
#homeChoiceV113.menuPageV115{
  position:fixed!important;
  left:0!important;
  right:0!important;
  top:62px!important;
  bottom:0!important;
  z-index:800!important;
  display:block!important;
  overflow:auto!important;
  box-sizing:border-box!important;
  background-color:#080b0e!important;
  background-image:var(--shop-bg-image, none);
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}

/* Preserve the user's existing body/shop background visually behind the cards.
   A translucent layer keeps menu text readable. */
#homeChoiceV113.menuPageV115::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:rgba(0,0,0,.20);
}

body.mainMenuOpenV115{
  overflow:hidden!important;
}

/* Header stays above the menu so branding/shop settings remain visible. */
body.mainMenuOpenV115 header{
  position:relative!important;
  z-index:900!important;
}

/* Do not alter or hide any RTA element in V1.15. */

/* V1.16 BACKGROUND FIX
   The user's existing saved shop background remains owned by the original app/body.
   The Main Menu must be transparent and must NOT create its own background image. */
#homeChoiceV113.menuPageV115{
  background:transparent!important;
  background-image:none!important;
  background-color:transparent!important;
}

/* No dark image-replacing layer. Keep only a very light readability wash. */
#homeChoiceV113.menuPageV115::before{
  content:"";
  position:fixed;
  left:0;
  right:0;
  top:62px;
  bottom:0;
  z-index:-1;
  background:rgba(0,0,0,.08)!important;
  pointer-events:none;
}

/* Make sure the original branded page/background remains visible below the menu. */
body.mainMenuOpenV115{
  background-attachment:fixed!important;
}

/* V1.17 motorcycle bag port reference */
.bagPortReferenceV117{
  margin:16px 0 18px;
  padding:14px;
  border:1px solid #34404a;
  border-radius:10px;
  background:#0d1318;
}
.bagPortRefTitle{
  font-size:12px;
  font-weight:900;
  letter-spacing:.7px;
  margin-bottom:10px;
}
.bagPortRefGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.bagPortRefGrid figure{margin:0}
.bagPortRefGrid img{
  display:block;
  width:100%;
  height:210px;
  object-fit:contain;
  border-radius:8px;
  background:#080b0e;
  border:1px solid #29343d;
}
.bagPortRefGrid figcaption{
  margin-top:7px;
  color:#aebbc6;
  font-size:11px;
  line-height:1.4;
}
.portDimHintV117{
  margin:-2px 0 7px;
  color:#8fa1af;
  font-size:10px;
}
@media(max-width:760px){
  .bagPortRefGrid{grid-template-columns:1fr}
  .bagPortRefGrid img{height:auto;max-height:300px}
}

/* V1.19 CLEAN THREE-PAGE NAVIGATION
   No overlay backgrounds. The original Shop Settings/body background remains untouched. */
#homeChoiceV113{
  position:static!important;
  inset:auto!important;
  z-index:auto!important;
  background:transparent!important;
  background-image:none!important;
}
#homeChoiceV113::before{display:none!important}
body.mainMenuOpenV115,
body.mainMenuOpenV118{
  overflow:auto!important;
}
.pageNavV119{
  display:flex;
  justify-content:flex-start;
  margin:0 0 14px;
}
#setup[hidden],
#rta[hidden],
#homeChoiceV113[hidden]{
  display:none!important;
}

/* V1.20 navigation repair */
.setupTitleRowV120{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  margin:0 0 6px!important;
}
.setupTitleRowV120 h2{margin:0!important}
.setupMainMenuV120,
.mainMenuRtaV120{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:130px!important;
  white-space:nowrap!important;
  flex:0 0 auto!important;
}
#rta .toolbar>div:last-child{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
@media(max-width:720px){
  .setupTitleRowV120{align-items:flex-start!important;flex-direction:column!important}
}

/* V1.21 - RTA Scale menu collision fix ONLY
   Screenshot showed Scale overlapping/under Smoothing.
   Force row 2 into four explicit non-overlapping columns. */

#rta .rtaControlsV114{
  overflow:visible!important;
}

/* Target Style / RTA Speed / Smoothing / Scale */
#rta .rtaControlsV114 .rtaRow2V114{
  display:grid!important;
  grid-template-columns:
    minmax(220px, .95fr)
    minmax(180px, .75fr)
    minmax(320px, 1.55fr)
    150px!important;
  column-gap:12px!important;
  row-gap:10px!important;
  align-items:end!important;
  width:100%!important;
  box-sizing:border-box!important;
}

#rta .rtaControlsV114 .rtaRow2V114 > *{
  min-width:0!important;
  width:100%!important;
  max-width:none!important;
  position:relative!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
}

/* Scale gets its own final column and cannot slide under Smoothing. */
#rta .rtaControlsV114 .rtaRow2V114 > *:last-child{
  width:150px!important;
  min-width:150px!important;
  max-width:150px!important;
  justify-self:start!important;
  z-index:2!important;
}

#rta .rtaControlsV114 .rtaRow2V114 select{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}

@media(max-width:1050px){
  #rta .rtaControlsV114 .rtaRow2V114{
    grid-template-columns:minmax(220px,1fr) minmax(180px,1fr)!important;
  }
  #rta .rtaControlsV114 .rtaRow2V114 > *:last-child{
    width:150px!important;
  }
}

/* V1.22 - ACTUAL Scale overlap fix.
   Root cause: an older rule forced Smoothing/select to min-width:300px,
   so it physically spilled into Scale's grid cell. */
@media(min-width:1201px){
  .controls .smoothingControl{
    grid-area:smooth!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  .controls .smoothingControl select{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .controls .scaleControl{
    grid-area:scale!important;
    width:155px!important;
    min-width:155px!important;
    max-width:155px!important;
    position:relative!important;
    z-index:3!important;
  }
  .controls .scaleControl select{
    width:155px!important;
    min-width:155px!important;
    max-width:155px!important;
    box-sizing:border-box!important;
  }
}

/* V1.23 PORT REFERENCE ONLY. RTA CSS intentionally untouched. */
.portRefZoomV123{
  cursor:zoom-in!important;
}
.bagPortRefGrid img.portRefZoomV123{
  height:250px!important;
  object-fit:contain!important;
}
.portRefLightboxV123{
  position:fixed!important;
  inset:0!important;
  z-index:99999!important;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  background:rgba(0,0,0,.92);
  box-sizing:border-box;
}
.portRefLightboxV123[hidden]{display:none!important}
.portRefLightboxV123 img{
  display:block;
  max-width:94vw;
  max-height:88vh;
  width:auto;
  height:auto;
  object-fit:contain;
  border:1px solid #46515b;
  border-radius:10px;
  background:#050709;
  box-shadow:0 18px 60px rgba(0,0,0,.7);
}
.portRefLightboxCloseV123{
  position:fixed;
  top:18px;
  right:22px;
  z-index:100000;
  width:48px;
  height:48px;
  border-radius:9px;
  border:1px solid #52606c;
  background:#151c22;
  color:#fff;
  font-size:32px;
  line-height:1;
  cursor:pointer;
}
.portRefLightboxHintV123{
  position:fixed;
  bottom:12px;
  left:50%;
  transform:translateX(-50%);
  color:#b9c5cf;
  font-size:12px;
  white-space:nowrap;
}
body.portRefZoomOpenV123{overflow:hidden!important}

/* V1.24 PORT IMAGE FIX ONLY. RTA intentionally untouched. */
[data-port-ref-zoom]{
  cursor:zoom-in!important;
  pointer-events:auto!important;
}
#portRefLightboxV123{
  position:fixed!important;
  inset:0!important;
  z-index:2147483647!important;
  align-items:center!important;
  justify-content:center!important;
  padding:24px!important;
  background:rgba(0,0,0,.94)!important;
  box-sizing:border-box!important;
}
#portRefLightboxV123[hidden]{
  display:none!important;
}
#portRefLightboxImgV123{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:94vw!important;
  max-height:90vh!important;
  object-fit:contain!important;
  background:#050709!important;
}
html.portRefZoomOpenV124,
html.portRefZoomOpenV124 body{
  overflow:hidden!important;
}

/* V1.25 PORT REFERENCE ZOOM ONLY. RTA CSS NOT CHANGED. */
.portRefOpenV125{
  display:block!important;
  width:100%!important;
  height:100%!important;
  cursor:zoom-in!important;
}
.portRefOpenV125 img{
  cursor:zoom-in!important;
}
#portZoomOverlayV125{
  position:fixed!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  width:100vw!important;
  height:100vh!important;
  z-index:2147483647!important;
  align-items:center!important;
  justify-content:center!important;
  padding:24px!important;
  box-sizing:border-box!important;
  background:rgba(0,0,0,.96)!important;
  isolation:isolate!important;
}
#portZoomOverlayV125[hidden]{
  display:none!important;
}
#portZoomImageV125{
  display:block!important;
  position:relative!important;
  z-index:2147483647!important;
  width:auto!important;
  height:auto!important;
  max-width:94vw!important;
  max-height:88vh!important;
  object-fit:contain!important;
  border:2px solid #65727d!important;
  border-radius:10px!important;
  background:#050709!important;
  box-shadow:0 20px 80px #000!important;
}
#portZoomCloseV125{
  position:fixed!important;
  top:18px!important;
  right:22px!important;
  z-index:2147483647!important;
  width:52px!important;
  height:52px!important;
  padding:0!important;
  border-radius:9px!important;
  border:1px solid #65727d!important;
  background:#151c22!important;
  color:#fff!important;
  font-size:34px!important;
  line-height:48px!important;
  cursor:pointer!important;
}
#portZoomCaptionV125{
  position:fixed!important;
  left:50%!important;
  bottom:14px!important;
  transform:translateX(-50%)!important;
  z-index:2147483647!important;
  color:#fff!important;
  background:rgba(0,0,0,.72)!important;
  padding:7px 12px!important;
  border-radius:6px!important;
  font-size:12px!important;
  white-space:nowrap!important;
}

/* V1.26 PORT REFERENCE NATIVE TOP-LAYER VIEWER ONLY.
   RTA CSS remains untouched. */
.portZoomDialogV126{
  width:96vw!important;
  height:94vh!important;
  max-width:none!important;
  max-height:none!important;
  margin:auto!important;
  padding:18px!important;
  border:1px solid #5f6b75!important;
  border-radius:12px!important;
  background:#080b0e!important;
  color:#fff!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
.portZoomDialogV126::backdrop{
  background:rgba(0,0,0,.96)!important;
}
.portZoomStageV126{
  width:100%!important;
  height:calc(100% - 42px)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:auto!important;
}
#portZoomImageV126{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  background:#050709!important;
}
.portZoomCloseV126{
  position:absolute!important;
  top:12px!important;
  right:12px!important;
  z-index:2!important;
  width:50px!important;
  height:50px!important;
  padding:0!important;
  border-radius:8px!important;
  border:1px solid #697782!important;
  background:#151c22!important;
  color:#fff!important;
  font-size:34px!important;
  line-height:46px!important;
  cursor:pointer!important;
}
.portZoomCaptionV126{
  height:32px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#c3cdd5!important;
  font-size:12px!important;
}

/* V1.27 PORT CALCULATOR ONLY. RTA IS UNTOUCHED. */
.portCalcDialog{
  height:min(94vh,1100px)!important;
  max-height:94vh!important;
  overflow:hidden!important;
}
.portCalcHead{
  max-height:390px!important;
  overflow:auto!important;
}
.portCalcBody{
  height:auto!important;
  max-height:none!important;
  overflow-y:auto!important;
  padding-bottom:70px!important;
}
.pcSuggestedPortV127{
  margin-top:16px;
  padding:12px 14px;
  border:1px solid #3a4650;
  border-radius:9px;
  background:#151d23;
  line-height:1.4;
}
.pcSuggestedTitleV127{
  margin-bottom:5px;
  color:#9eabb7;
  font-size:11px;
  font-weight:900;
  letter-spacing:.8px;
}
#pcSuggestedText{
  color:#fff;
  font-size:14px;
}
#pcSuggestedText b{
  font-size:17px;
}
#pcSuggestedText span{
  color:#aeb8c1;
  font-size:12px;
}
.pcSuggestedHintV127{
  margin-top:5px;
  color:#81909c;
  font-size:10px;
}

/* V1.28 LIVE PORT FINE TUNING ONLY. RTA IS LOCKED/UNTOUCHED. */
.pcLiveTuneV128{
  margin-top:16px;
  padding:15px;
  border:1px solid #3a4650;
  border-radius:10px;
  background:#10171c;
}
.pcLiveTuneHeadV128{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:14px;
}
.pcLiveTuneTitleV128{
  font-weight:900;
  letter-spacing:.8px;
  font-size:13px;
}
.pcLiveTuneSubV128{
  margin-top:3px;
  color:#8fa0ad;
  font-size:10px;
}
.pcLiveHzV128{
  min-width:110px;
  padding:8px 12px;
  border:1px solid #ef4438;
  border-radius:8px;
  text-align:center;
  font-size:20px;
  font-weight:900;
}
.pcSliderRowV128{
  display:grid;
  grid-template-columns:minmax(190px,1fr) 90px;
  gap:4px 12px;
  align-items:center;
  margin:12px 0;
}
.pcSliderRowV128>span{
  font-size:13px;
}
.pcSliderRowV128 small{
  display:block;
  margin-top:2px;
  color:#82919d;
  font-size:9px;
  font-weight:400;
}
.pcSliderRowV128>strong{
  text-align:right;
  font-size:14px;
}
.pcSliderRowV128 input[type="range"]{
  grid-column:1 / -1;
  width:100%;
  accent-color:#ef4438;
  cursor:pointer;
}
.pcLiveStatsV128{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-top:14px;
}
.pcLiveStatsV128>div{
  padding:8px;
  border:1px solid #303b44;
  border-radius:7px;
  background:#151d23;
  text-align:center;
}
.pcLiveStatsV128 span{
  display:block;
  color:#8999a5;
  font-size:9px;
}
.pcLiveStatsV128 b{
  display:block;
  margin-top:3px;
  color:#fff;
  font-size:12px;
}
@media(max-width:650px){
  .pcLiveTuneHeadV128{align-items:flex-start;flex-direction:column}
  .pcLiveStatsV128{grid-template-columns:1fr}
}

/* ==========================================================
   V1.29 PORT CALCULATOR TWO-WINDOW LAYOUT
   RTA IS LOCKED. DO NOT APPLY THESE RULES OUTSIDE .portCalcDialog
   ========================================================== */
@media (min-width: 1050px) {
  .portCalcDialog{
    width:min(1500px,96vw)!important;
    height:min(92vh,980px)!important;
    max-width:none!important;
    max-height:92vh!important;
    overflow:hidden!important;
    display:grid!important;
    grid-template-columns:430px minmax(0,1fr)!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    gap:0!important;
  }

  /* Header remains across both columns */
  .portCalcDialog > .portCalcTitle,
  .portCalcDialog > .portCalcHeader,
  .portCalcDialog > header{
    grid-column:1 / -1!important;
  }

  /* Left reference window */
  .portCalcHead{
    grid-column:1!important;
    grid-row:2!important;
    max-height:none!important;
    height:100%!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:22px!important;
    border-right:1px solid #34404a!important;
    border-bottom:0!important;
    background:#11181e!important;
  }

  /* The reference card itself becomes a vertical stack */
  .portCalcHead .portReferenceCard,
  .portCalcHead .portReference,
  .portCalcHead .portReferenceWrap,
  .portCalcHead > div{
    max-width:100%!important;
  }

  .portCalcHead .portRefGrid,
  .portCalcHead .portReferenceGrid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:18px!important;
  }

  /* Catch the actual two reference image containers even if older class names differ */
  .portCalcHead img{
    max-width:100%!important;
    height:auto!important;
    object-fit:contain!important;
  }

  /* Right calculator window */
  .portCalcBody{
    grid-column:2!important;
    grid-row:2!important;
    height:100%!important;
    max-height:none!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:22px 26px 80px!important;
    scrollbar-gutter:stable!important;
    background:#0e1419!important;
  }

  /* Keep enclosure + port controls side by side inside right pane */
  .portCalcBody .portCalcColumns{
    display:grid!important;
    grid-template-columns:minmax(300px,.85fr) minmax(430px,1.15fr)!important;
    gap:18px!important;
    align-items:start!important;
  }
}

/* Smaller screens fall back to a clean single column instead of clipping. */
@media (max-width:1049px){
  .portCalcDialog{
    width:96vw!important;
    max-width:96vw!important;
    height:94vh!important;
    max-height:94vh!important;
    overflow-y:auto!important;
  }
  .portCalcHead,
  .portCalcBody{
    max-height:none!important;
    height:auto!important;
    overflow:visible!important;
  }
}

@media (min-width:1050px){
  .pcReferencePaneV129 .pcReferenceGridV129{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:18px!important;
  }
  .pcReferencePaneV129 .pcRefItemV129{
    width:100%!important;
    max-width:100%!important;
  }
}



/* ============================================================
   V1.33 FOUR-PAGE ROUTER
   Page 3 / RTA layout rules above this block are LOCKED.
   ============================================================ */
#homeChoiceV113[hidden],
#setup[hidden],
#rta[hidden],
#portCalcDialog[hidden]{
  display:none!important;
}

/* PAGE 4 is a NORMAL PAGE, not a dialog/modal. */
#portCalcDialog.pageV133.activePageV133{
  display:grid!important;
  position:relative!important;
  width:100%!important;
  min-height:calc(100vh - 62px)!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:#0b1014!important;
  overflow:visible!important;
  grid-template-columns:minmax(390px,36%) minmax(0,64%)!important;
  grid-template-rows:58px minmax(calc(100vh - 120px),auto)!important;
  box-sizing:border-box!important;
}

/* Page 4 top bar */
#portCalcDialog .portPageBarV133{
  grid-column:1 / -1!important;
  grid-row:1!important;
  display:flex!important;
  align-items:center!important;
  gap:18px!important;
  padding:9px 22px!important;
  border-bottom:1px solid #303b44!important;
  background:#0d1318!important;
}
#portBackMainV133{
  width:auto!important;
  padding:10px 15px!important;
  border:1px solid #46545f!important;
  border-radius:7px!important;
  background:#182128!important;
  color:#fff!important;
  font-weight:900!important;
  cursor:pointer!important;
}

/* Page 4 LEFT: references */
#portCalcDialog.activePageV133 > .portCalcHead{
  grid-column:1!important;
  grid-row:2!important;
  display:block!important;
  width:100%!important;
  height:calc(100vh - 120px)!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  padding:22px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  border:0!important;
  border-right:1px solid #34404a!important;
  background:#11181e!important;
  box-sizing:border-box!important;
}
#portCalcDialog.activePageV133 .bagPortRefGrid{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:22px!important;
}
#portCalcDialog.activePageV133 .bagPortRefGrid figure{
  width:100%!important;
  margin:0!important;
}
#portCalcDialog.activePageV133 .bagPortRefGrid img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:34vh!important;
  margin:0 auto!important;
  object-fit:contain!important;
  cursor:zoom-in!important;
}

/* Page 4 RIGHT: calculator */
#portCalcDialog.activePageV133 > .portCalcBody{
  grid-column:2!important;
  grid-row:2!important;
  display:block!important;
  width:100%!important;
  height:calc(100vh - 120px)!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  padding:22px 28px 100px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-gutter:stable!important;
  background:#0e1419!important;
  box-sizing:border-box!important;
}
#portCalcDialog.activePageV133 .portCalcGrid{
  display:grid!important;
  grid-template-columns:minmax(280px,.82fr) minmax(420px,1.18fr)!important;
  gap:20px!important;
  align-items:start!important;
  width:100%!important;
}

/* Laptop */
@media(max-width:1180px){
  #portCalcDialog.pageV133.activePageV133{
    grid-template-columns:32% 68%!important;
  }
  #portCalcDialog.activePageV133 .portCalcGrid{
    grid-template-columns:1fr!important;
  }
}

/* Mobile/tablet */
@media(max-width:760px){
  #portCalcDialog.pageV133.activePageV133{
    grid-template-columns:1fr!important;
    grid-template-rows:58px auto auto!important;
  }
  #portCalcDialog.activePageV133 > .portCalcHead{
    grid-column:1!important;
    grid-row:2!important;
    height:auto!important;
    overflow:visible!important;
    border-right:0!important;
    border-bottom:1px solid #34404a!important;
  }
  #portCalcDialog.activePageV133 > .portCalcBody{
    grid-column:1!important;
    grid-row:3!important;
    height:auto!important;
    overflow:visible!important;
  }
}

.pcInnerWarningV134{margin:0 0 16px;padding:12px 14px;border:1px solid #d58a2d;border-radius:8px;background:#241b10;color:#fff}
.pcInnerWarningV134 strong{display:block;margin-bottom:5px;color:#ffb347;font-size:13px}
.pcInnerWarningV134 span{display:block;color:#ddd;font-size:11px;line-height:1.45}

/* V1.36: LIVE PORT FINE TUNING is the single calculator/result.
   Old Calculate button and duplicate lower result are retired. */
#portCalcDialog .portCalcResult{
  display:none!important;
}

/* V1.37: live sliders are the ONLY visible slot-dimension controls.
   Keep legacy W/L inputs as hidden state for JS compatibility. */
#pcSlotFields .field:has(#pcSlotWidth),
#pcSlotFields .field:has(#pcSlotHeight),
#pcSuggestedPort,
.pcSuggestedPort,
.suggestedPort,
.portSuggested{
  display:none!important;
}

.pcSuggestedHiddenV137{display:none!important;}

/* V1.38: one approved combined bag + port reference image only */
.singlePortReferenceV138 .bagPortRefGrid{
  display:block!important;
}
.singlePortReferenceV138 figure{
  margin:0!important;
  width:100%!important;
}
.singlePortReferenceV138 img{
  display:block;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  object-fit:contain!important;
}
.singlePortReferenceV138 figcaption{
  display:none!important;
}

/* V1.39 correction:
   Hide the two duplicate manual SLOT dimension fields above Live Fine Tuning.
   KEEP all Live Port Fine Tuning sliders visible. */
#pcSlotFields{
  display:none!important;
}
#pcSuggestedPort{
  display:none!important;
}
#pcLiveTuneV128,
#pcSlotSlidersV128,
#pcRoundSlidersV128{
  display:block;
}
#pcRoundSlidersV128[hidden],
#pcSlotSlidersV128[hidden]{
  display:none!important;
}

/* V1.40: ROUND ports use live sliders only.
   Hide the duplicate manual diameter field above Live Fine Tuning. */
#pcRoundFields{
  display:none!important;
}

/* Explicitly preserve the controls we DO want. */
#pcPortType,
#pcPortCount,
#pcLiveTuneV128{
  visibility:visible!important;
}

/* V1.42: bottom panel is DATA ONLY.
   Port dimensions + actual/target tuning live in LIVE PORT FINE TUNING above. */
#portCalcDialog .portCalcResult > .portCalcHero,
#portCalcDialog .portCalcResult > .portCalcWarning,
#portCalcDialog .portCalcResult > .portCalcFootnote{
  display:none!important;
}
#portCalcDialog .portCalcResult{
  display:block!important;
}
#portCalcDialog .portCalcResult::before{
  content:"ENCLOSURE / PORT DATA";
  display:block;
  padding:14px 16px 10px;
  font-weight:800;
  letter-spacing:.08em;
  text-align:center;
}

/* V1.43 optional port-velocity estimator */
.pcVelocitySetupV143{
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.12);
}
.pcVelocityTitleV143{
  margin-bottom:4px;
  font-weight:800;
  letter-spacing:.05em;
}
.pcVelocityStatV143{
  min-width:140px;
}

/* V1.44 woofer size -> estimated Sd helper */
.pcSdEstimateV144{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:8px 0 10px;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:7px;
  background:rgba(255,255,255,.035);
}
.pcSdEstimateV144 span{font-size:11px;opacity:.75}
.pcSdEstimateV144 b{font-size:12px}
.pcSdOverrideLabelV144{
  display:flex!important;
  align-items:center;
  gap:8px;
  font-size:11px!important;
  cursor:pointer;
}
.pcSdOverrideLabelV144 input{width:auto!important}

/* V1.45 live port-velocity traffic light */
#pcVelocityV143.velocityGoodV145,
#pcMachV143.velocityGoodV145{
  color:#4cff88!important;
  text-shadow:0 0 10px rgba(76,255,136,.20);
}
#pcVelocityV143.velocityOkayV145,
#pcMachV143.velocityOkayV145{
  color:#ffd34d!important;
  text-shadow:0 0 10px rgba(255,211,77,.18);
}
#pcVelocityV143.velocityBadV145,
#pcMachV143.velocityBadV145{
  color:#ff5b5b!important;
  text-shadow:0 0 10px rgba(255,91,91,.20);
}

/* V1.46 live visual gauges */
.pcGaugePanelV146{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:14px 0 4px}
.pcGaugeBlockV146{padding:12px;border:1px solid rgba(255,255,255,.12);border-radius:8px;background:rgba(255,255,255,.025)}
.pcGaugeHeadV146{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px;font-size:11px;font-weight:800}
.pcVelocityGaugeV146,.pcTuningGaugeV146{position:relative;height:18px;border-radius:9px;background:#25303a}
.pcVelocityGaugeV146{display:flex}
.pcGaugeZoneV146{height:100%}
.pcGaugeGreenV146{width:48.57%;background:#27c96f;border-radius:9px 0 0 9px}
.pcGaugeYellowV146{width:22.86%;background:#e7bd37}
.pcGaugeRedV146{width:28.57%;background:#e34b4b;border-radius:0 9px 9px 0}
.pcGaugeMarkerV146{position:absolute;top:-5px;width:4px;height:28px;transform:translateX(-2px);background:#fff;border-radius:2px;box-shadow:0 0 8px rgba(255,255,255,.8);z-index:3}
.pcGaugeScaleV146{display:flex;justify-content:space-between;gap:8px;margin-top:5px;font-size:9px;opacity:.72}
.pcTuningGaugeV146{background:linear-gradient(90deg,#7f3434 0%,#b99331 35%,#2da96a 47%,#2da96a 53%,#b99331 65%,#7f3434 100%)}
.pcTuningCenterV146{position:absolute;left:50%;top:-3px;width:2px;height:24px;background:#fff;opacity:.65}
.pcTuningMarkerV146.tuneGoodV146{background:#4cff88}
.pcTuningMarkerV146.tuneOkayV146{background:#ffd34d}
.pcTuningMarkerV146.tuneBadV146{background:#ff5b5b}
@media(max-width:900px){.pcGaugePanelV146{grid-template-columns:1fr}}
.dspSetupV20{margin:14px 0;padding:16px;border:1px solid rgba(255,255,255,.15);border-radius:12px;background:rgba(8,13,18,.9)}.dspSetupHeaderV20 h2{margin:0}.dspSetupHeaderV20 p{opacity:.72}.dspCountLabelV20{display:flex;gap:10px;align-items:center;margin:12px 0;font-weight:800}.dspCardV20{margin:12px 0;border:1px solid rgba(255,255,255,.12);border-radius:9px;overflow:hidden}.dspHeadV20{display:flex;justify-content:space-between;padding:10px;background:rgba(255,255,255,.05)}.dspHeadV20 label{display:flex;gap:8px;align-items:center;font-size:10px;font-weight:800}.dspScrollV20{overflow-x:auto}.dspRowV20{display:grid;grid-template-columns:34px 150px 50px 105px 105px 135px 105px 72px 72px 115px 48px 52px;gap:6px;align-items:center;padding:6px 8px;min-width:1110px;border-top:1px solid rgba(255,255,255,.06)}.dspHdrV20{font-size:9px;opacity:.65}.dspRowV20 input,.dspRowV20 select{min-width:0;width:100%;box-sizing:border-box;font-size:10px;padding:5px}.dspRowV20 input[type=checkbox],.dspRowV20 input[type=radio]{width:auto;justify-self:center}.slopesV20{display:grid;grid-template-columns:1fr 1fr;gap:3px}.dspNoteV20{padding:9px;background:rgba(255,255,255,.04);border-radius:7px;font-size:11px}.rtaStatusV20{display:grid;grid-template-columns:1fr 180px;gap:12px;margin:12px 0}.nowTuningV20,.splBoxV20{padding:12px;border:1px solid rgba(255,255,255,.14);border-radius:10px;background:rgba(8,13,18,.9)}.nowTuningV20 span,.splBoxV20 span{display:block;font-size:10px;font-weight:800;opacity:.65}.nowTuningV20 strong{display:block;font-size:18px;margin:4px 0}.splBoxV20{text-align:center}.splBoxV20 strong{font-size:34px}.splBoxV20 div{font-size:10px;opacity:.7}@media(max-width:760px){.rtaStatusV20{grid-template-columns:1fr}.dspHeadV20{flex-direction:column;gap:8px}}
/* RTA 2.0 Dev2: working-channel selector on RTA page */
.rtaChannelSelectorV20{margin:12px;padding:12px;border:1px solid rgba(255,255,255,.14);border-radius:10px;background:rgba(8,13,18,.9)}
.rtaChannelSelectorHeadV20{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}
.rtaChannelSelectorHeadV20 span{display:block;font-size:10px;font-weight:800;opacity:.65}
.rtaChannelSelectorHeadV20 strong{display:block;font-size:14px;margin-top:2px}
.rtaChannelControlsV20{display:grid;grid-template-columns:180px 1fr 190px;gap:10px;align-items:end}
.rtaChannelControlsV20 label{font-size:10px;font-weight:800}.rtaChannelControlsV20 select{display:block;width:100%;margin-top:5px}
.rtaSelectedChannelV20{margin-top:10px;padding:9px;border-radius:7px;background:rgba(255,255,255,.045)}
.rtaSelectedChannelV20 b,.rtaSelectedChannelV20 span{display:block}.rtaSelectedChannelV20 span{font-size:11px;opacity:.75;margin-top:3px}
@media(max-width:850px){.rtaChannelControlsV20{grid-template-columns:1fr}.rtaChannelSelectorHeadV20{align-items:flex-start;flex-direction:column}}

/* Dev3 whole-system control */
.rtaChannelButtonsV203{display:grid;grid-template-columns:1fr;gap:6px}
#rtaUnmuteAllV203{font-weight:900;border-color:rgba(255,255,255,.22)}

.analysisWarningV204{padding:14px;border:1px solid #d7a51f;border-radius:9px;background:rgba(215,165,31,.10);color:#f3cf63;line-height:1.45}

/* Dev5: DSP-aware analysis */
.activeBandNoticeV205{display:flex;justify-content:space-between;gap:14px;align-items:center;margin:10px 0;padding:10px 12px;border:1px solid rgba(53,211,116,.38);border-radius:8px;background:rgba(53,211,116,.07)}
.activeBandNoticeV205 b{font-size:11px;color:#67e89a}.activeBandNoticeV205 span{font-size:10px;opacity:.78;text-align:right}
@media(max-width:700px){.activeBandNoticeV205{align-items:flex-start;flex-direction:column}.activeBandNoticeV205 span{text-align:left}}

/* Dev6: whole-system mute/unmute toggle */
#rtaUnmuteAllV203.allMutedModeV206{border-color:#e14b42;background:rgba(225,75,66,.12)}

/* Dev7: active/not-active channel toggle */
#rtaSetActiveV20.channelActiveV207{border-color:#e14b42;background:rgba(225,75,66,.12);font-weight:900}

/* Dev8: multiple independent active channels */
.dspRowV20 input[data-k="active"]:checked{accent-color:#32d875}

/* Dev11: measurement mic position */
.micPositionSetupV211{margin:14px 0;padding:16px;border:1px solid rgba(255,255,255,.15);border-radius:12px;background:rgba(8,13,18,.9)}
.micPositionHeadV211 h2{margin:0}.micPositionHeadV211 p{margin:5px 0 0;opacity:.72;font-size:12px}
.micPositionGridV211{display:grid;grid-template-columns:120px 1.4fr 120px 90px;gap:10px;margin-top:14px}
.micPositionGridV211 label,.micCustomRowV211 label{font-size:10px;font-weight:800}
.micPositionGridV211 select,.micPositionGridV211 input,.micCustomRowV211 input{display:block;width:100%;box-sizing:border-box;margin-top:5px}
.micCustomRowV211{margin-top:10px}
.micPresetV211{display:flex;justify-content:space-between;gap:12px;margin-top:10px;padding:10px;border-radius:8px;background:rgba(255,255,255,.045)}
.micPresetV211 b{font-size:12px}.micPresetV211 span{font-size:11px;opacity:.78;text-align:right}
.micFutureV211{margin-top:8px;font-size:10px;opacity:.62}
.rtaMicPositionV211{display:grid;grid-template-columns:240px 1fr 145px;gap:12px;align-items:center;margin:12px 0;padding:11px 12px;border:1px solid rgba(182,108,255,.38);border-radius:10px;background:rgba(182,108,255,.055)}
.rtaMicTitleV211 span{display:block;font-size:9px;font-weight:800;opacity:.6}.rtaMicTitleV211 strong{display:block;margin-top:3px;font-size:13px}
.rtaMicDetailV211{font-size:11px;opacity:.8}
@media(max-width:800px){.micPositionGridV211{grid-template-columns:1fr 1fr}.rtaMicPositionV211{grid-template-columns:1fr}.micPresetV211{flex-direction:column}.micPresetV211 span{text-align:left}}

/* Dev12: multi-mic setup + larger setup-page typography */
.micPositionSetupV211{font-size:14px}
.micPositionHeadV211 h2{font-size:21px}
.micPositionHeadV211 p{font-size:14px;line-height:1.45}
.micCountTopV212{margin-top:16px;padding:13px;border-radius:9px;background:rgba(255,255,255,.055)}
.micCountTopV212 label{display:grid;grid-template-columns:260px 180px;gap:12px;align-items:center;font-size:14px;font-weight:900}
.micCountTopV212 select{font-size:14px;padding:8px}
.micPositionGridV211 label,.micCustomRowV211 label{font-size:12px}
.micPositionGridV211 select,.micPositionGridV211 input,.micCustomRowV211 input{font-size:14px;padding:8px}
.micPresetV211 b{font-size:14px}.micPresetV211 span{font-size:13px}
.micSummaryV212{display:grid;gap:6px;margin-top:10px}
.micSummaryV212>div{display:grid;grid-template-columns:70px 1fr;gap:10px;padding:8px 10px;border:1px solid rgba(255,255,255,.08);border-radius:7px;background:rgba(255,255,255,.025)}
.micSummaryV212 b{font-size:12px}.micSummaryV212 span{font-size:12px;opacity:.8}
.dspSetupV20{font-size:14px}.dspSetupHeaderV20 h2{font-size:21px}.dspSetupHeaderV20 p{font-size:14px}
.dspCountLabelV20{font-size:13px}.dspHeadV20 label{font-size:12px}
.dspHdrV20{font-size:10px}.dspRowV20 input,.dspRowV20 select{font-size:12px;padding:7px}
.dspNoteV20{font-size:13px;line-height:1.45}
@media(max-width:700px){.micCountTopV212 label{grid-template-columns:1fr}.micPositionGridV211{grid-template-columns:1fr}}

/* Dev13: working mic selector directly on RTA page */
#rtaMicSelectV213{display:block;width:100%;margin-top:5px;font-size:14px;font-weight:800;padding:8px}
.rtaMicDetailV211 strong,.rtaMicDetailV211 span{display:block}
.rtaMicDetailV211 strong{font-size:13px}.rtaMicDetailV211 span{margin-top:4px;font-size:12px;opacity:.8}

/* Dev16: repair mic setup layout on Setup + RTA pages */
.micPositionSetupV211{font-size:14px!important}
.micCountTopV212{display:block!important}
.micCountTopV212 label{display:flex!important;grid-template-columns:none!important;align-items:center!important;gap:18px!important;font-size:14px!important}
.micCountTopV212 select{width:180px!important;min-width:180px!important}
.micPositionGridV211{
  display:grid!important;
  grid-template-columns:120px minmax(260px,1fr) 120px 90px!important;
  gap:12px!important;
  align-items:end!important;
}
.micPositionGridV211 label{min-width:0!important}
.micPositionGridV211 select,.micPositionGridV211 input{
  width:100%!important;min-width:0!important;height:38px!important;box-sizing:border-box!important;
}
.micCustomRowV211 input{height:38px!important}
#micNumberV211{width:100%!important}
#micPositionV211{width:100%!important}
#micDistanceV211{width:100%!important}
#micDistanceUnitV211{width:100%!important}
.rtaMicPositionV211{
  display:grid!important;
  grid-template-columns:240px minmax(320px,1fr) 145px!important;
  gap:12px!important;align-items:center!important;
}
#rtaMicSelectV213{width:100%!important;min-width:0!important;height:38px!important}
.rtaMicDetailV211{min-width:0!important}
@media(max-width:900px){
  .micPositionGridV211{grid-template-columns:1fr 1fr!important}
  .rtaMicPositionV211{grid-template-columns:1fr!important}
}

/* Dev19: Edit Mic Setup button removed */
.rtaMicPositionV211{
  grid-template-columns:240px minmax(320px,1fr)!important;
}
@media(max-width:900px){
  .rtaMicPositionV211{grid-template-columns:1fr!important}
}

/* Dev20: Main Menu moved beside Shop Settings */
.headerActions{display:flex!important;align-items:center!important;gap:8px!important}
.headerActions .setupMainMenuV120{margin:0!important}

/* Dev22: larger Working Channel controls for laptop/shop visibility */
.rtaChannelSelectorV20{font-size:15px!important}
.rtaChannelSelectorV20 label{
  font-size:13px!important;
  font-weight:900!important;
  line-height:1.3!important;
}
.rtaChannelSelectorV20 select{
  min-height:44px!important;
  height:44px!important;
  font-size:15px!important;
  font-weight:700!important;
  padding:7px 10px!important;
}
.rtaChannelSelectorV20 .channelInfoV20,
.rtaChannelSelectorV20 .activeChannelInfoV20{
  font-size:14px!important;
  line-height:1.45!important;
}
#rtaDspSelectV20,#rtaChannelSelectV20{
  min-height:44px!important;
  font-size:15px!important;
}

/* Dev23: clear channel-state colors
   GREEN = selected channel is ACTIVE / UNMUTED
   RED   = selected channel is MUTED / NOT ACTIVE */
#rtaSetActiveV20.channelActiveV207{
  background:rgba(20,115,62,.38)!important;
  border-color:#24d26f!important;
  color:#fff!important;
  box-shadow:0 0 0 1px rgba(36,210,111,.12) inset!important;
}
#rtaSetActiveV20.channelMutedV223{
  background:rgba(120,25,25,.34)!important;
  border-color:#ef4444!important;
  color:#fff!important;
}

/* Dev25: EQ Assistant uses severity colors instead of +/- colors */
.eqGuideRowV225{align-items:center!important}
.eqGuideRowV225 .eqOnTargetV225{color:#32e67d!important;font-weight:800!important}
.eqGuideRowV225 .eqSlightV225{color:#ffd34d!important;font-weight:800!important}
.eqGuideRowV225 .eqNeedsWorkV225{color:#ff5b57!important;font-weight:800!important}
.eqGuideRowV225 .eqActionV225{letter-spacing:.01em}

/* Dev27: Main-menu motorcycle tuning guide */
.goodTuneModalV227{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.82);padding:24px;overflow:auto;display:flex;align-items:flex-start;justify-content:center}
.goodTuneModalV227.hidden{display:none!important}
.goodTunePanelV227{width:min(1100px,96vw);margin:auto;background:#10141d;border:1px solid rgba(255,255,255,.16);border-radius:14px;padding:22px;box-shadow:0 24px 80px rgba(0,0,0,.55)}
.goodTuneHeadV227{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;border-bottom:1px solid rgba(255,255,255,.1);padding-bottom:14px}
.goodTuneHeadV227 h2{font-size:25px;margin:5px 0 0}
.goodTuneIntroV227{font-size:16px;line-height:1.55;margin:18px 0}
.goodTuneGridV227{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.goodTuneGridV227>div{padding:15px;border:1px solid rgba(255,255,255,.09);border-radius:9px;background:rgba(255,255,255,.035)}
.goodTuneGridV227 b{font-size:14px}
.goodTuneGridV227 p{font-size:14px;line-height:1.5;margin:7px 0 0;opacity:.9}
.goodTuneBottomV227{margin-top:15px;padding:15px;border-radius:9px;background:rgba(103,80,255,.14);border:1px solid rgba(133,110,255,.35);font-size:15px;line-height:1.45}
@media(max-width:800px){.goodTuneGridV227{grid-template-columns:1fr}.goodTuneHeadV227{flex-direction:column}.goodTuneModalV227{padding:10px}}

/* Dev28: separate competition/ring tuning from rider/street tuning */
.tuneTypeGridV228{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}
.tuneTypeCardV228{padding:17px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.035)}
.tuneTypeCardV228.competitionV228{border-color:rgba(255,197,61,.4);background:rgba(255,197,61,.055)}
.tuneTypeCardV228.riderV228{border-color:rgba(66,184,255,.35);background:rgba(66,184,255,.05)}
.tuneTypeBadgeV228{display:inline-block;font-size:14px;font-weight:900;letter-spacing:.03em}
.tuneTypeCardV228 h3{font-size:18px;margin:9px 0}
.tuneTypeCardV228 p{font-size:14px;line-height:1.55;margin:0}
.tuneTypeGoalV228{margin-top:13px;padding:10px;border-radius:7px;background:rgba(0,0,0,.22);font-size:13px;line-height:1.45}
.ringTuneHeadingV228{margin:22px 0 12px;padding:13px 15px;border-left:4px solid #ffc53d;background:rgba(255,197,61,.06)}
.ringTuneHeadingV228 span{display:block;font-size:17px;font-weight:900}
.ringTuneHeadingV228 small{display:block;margin-top:4px;font-size:13px;opacity:.78}
@media(max-width:800px){.tuneTypeGridV228{grid-template-columns:1fr}}

/* Dev29: one unified Target Curve selector */
.targetSongControl{min-width:420px!important}
#activeTargetSelect{min-height:44px!important;font-size:15px!important;font-weight:800!important}
.curveStyleControl{display:none!important}
@media(max-width:800px){.targetSongControl{min-width:0!important;width:100%!important}}

/* Dev30: selectable target-curve colors, including arbitrary custom color */
.targetColorControlV230{min-width:230px}
.targetColorRowV230{display:flex;gap:8px;align-items:center}
#targetCurveColorPreset{min-height:44px;font-size:14px;font-weight:800;flex:1}
#targetCurveColorCustom{width:52px;height:44px;padding:2px;border-radius:7px;cursor:pointer}

/* Dev31: main-menu branded background repair.
   Background image is now applied directly to the full-screen menu surface by JS. */
#homeChoiceV113{
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

/* Dev32 background diagnostic preview */
.mainBgStatusV232{margin-top:9px;font-weight:800;color:#78e69b}
.mainBgPreviewV232{height:90px;margin-top:8px;border:1px solid #34404a;border-radius:8px;background-size:cover;background-position:center}

/* Dev34: Gross -> deductions -> Final Net design workflow */
.portResultStatsV234{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.pcFinalNetV234{background:rgba(41,199,111,.10)!important;box-shadow:inset 0 0 0 1px rgba(41,199,111,.35)}
.pcFinalNetV234 span,.pcFinalNetV234 b{color:#54e58e!important}
.pcTargetTuneV234{background:rgba(255,196,77,.07)!important}
.pcActualTuneV234{background:rgba(85,184,255,.08)!important}
.pcTargetTuneV234 b{color:#ffc44d!important}
.pcActualTuneV234 b{color:#55b8ff!important}
.pcNetFormulaV234{padding:12px 16px;text-align:center;font-size:14px;font-weight:850;border-top:1px solid #2a333b;color:#dce7ee}
@media(max-width:900px){.portResultStatsV234{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Dev35 advanced driver data */
.pcAdvancedDriverV235{margin-top:18px;border:1px solid #34404a;border-radius:10px;padding:0;background:#0d1318}
.pcAdvancedDriverV235 summary{cursor:pointer;padding:14px 16px;font-weight:900;color:#f4f7f9}
.pcAdvancedDriverV235 summary span{font-size:10px;color:#8fa3b2;margin-left:8px}
.pcAdvancedGridV235{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:4px 16px 14px}
.pcAdvancedGridV235 label{font-weight:800}.pcAdvancedGridV235 small{display:block;color:#8295a4;font-weight:500;margin:3px 0 6px}
.pcAdvancedNoteV235{margin:0 16px 16px;padding:10px 12px;border-radius:7px;background:#121a20;color:#a9bbc8;font-size:12px}
.pcDriverAnalysisV235{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid #2a333b}
.pcDriverAnalysisV235>div{padding:13px 16px;text-align:center;border-right:1px solid #2a333b}
.pcDriverAnalysisV235 span{display:block;font-size:10px;color:#8fa3b2}.pcDriverAnalysisV235 b{display:block;margin:5px 0;font-size:16px}.pcDriverAnalysisV235 small{color:#8396a4}
@media(max-width:900px){.pcAdvancedGridV235,.pcDriverAnalysisV235{grid-template-columns:1fr}}

/* Dev36: spacing around Advanced Subwoofer Specs */
.pcAdvancedDriverV235{
  margin-top:10px !important;
  margin-bottom:22px !important;
}

/* Dev37 optional amplifier / system power analysis */
.pcPowerAnalysisV237{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid #2a333b}
.pcPowerAnalysisV237>div{padding:13px 16px;text-align:center;border-right:1px solid #2a333b;background:#0d1318}
.pcPowerAnalysisV237 span{display:block;font-size:10px;color:#8fa3b2}
.pcPowerAnalysisV237 b{display:block;margin:5px 0;font-size:16px;color:#f3f7fa}
.pcPowerAnalysisV237 small{color:#8396a4}
@media(max-width:900px){.pcPowerAnalysisV237{grid-template-columns:1fr}}

/* Dev38: fix Advanced Specs input/unit alignment, especially Vas */
.pcAdvancedGridV235 .inputUnitRow{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:8px !important;
  width:100% !important;
}
.pcAdvancedGridV235 .inputUnitRow input{
  width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
.pcAdvancedGridV235 .inputUnitRow select{
  width:78px !important;
  min-width:78px !important;
  max-width:78px !important;
  box-sizing:border-box !important;
}
.pcAdvancedGridV235 .inputUnitRow > span{
  min-width:max-content !important;
  white-space:nowrap !important;
  font-weight:900 !important;
}

/* Dev39: system power split + calculated field */
.pcCalculatedFieldV239{
  min-height:42px;display:flex;align-items:center;padding:0 12px;
  border:1px solid #34404a;border-radius:5px;background:#11181e;
  color:#f3f7fa;font-weight:900;
}
.pcPowerAnalysisV239{grid-template-columns:repeat(5,minmax(0,1fr)) !important}
@media(max-width:1200px){.pcPowerAnalysisV239{grid-template-columns:repeat(2,minmax(0,1fr)) !important}}
@media(max-width:700px){.pcPowerAnalysisV239{grid-template-columns:1fr !important}}

/* Dev41: active target belongs with RTA controls, not inside song-curve creation */
.activeTargetCardV241{
  margin:10px 0 14px 0 !important;
  border-color:#6f3e8f !important;
  background:rgba(81,35,108,.18) !important;
}
.activeTargetCardV241 #savedTargetName{font-size:15px}
.activeTargetCardV241 #savedTargetDetail{font-size:12px}
#holdBtn.activeHold{
  background:#7a4aa0 !important;
  border-color:#b66cff !important;
  color:#fff !important;
  box-shadow:0 0 0 1px rgba(182,108,255,.35) inset;
}

/* BaggerLab Audio Tools authentication gate */
.blAuthGate{position:fixed;inset:0;z-index:100000;background:radial-gradient(circle at 50% 18%,#0c2741 0,#05090d 38%,#000 78%);display:flex;align-items:center;justify-content:center;overflow:auto;padding:24px;color:#fff}
.blAuthGate.unlocked{display:none}.blAuthShell{width:min(760px,96vw);text-align:center}.blLoginLogo{display:block;width:min(680px,92vw);max-height:48vh;object-fit:contain;margin:0 auto 10px;filter:drop-shadow(0 0 22px rgba(0,139,255,.2))}.blAuthCard{width:min(480px,92vw);margin:0 auto;background:rgba(8,14,20,.94);border:1px solid #263d51;border-radius:16px;padding:24px;box-shadow:0 22px 80px #000}.blAuthCard h2{margin:0 0 6px;font-size:24px}.blAuthCard p{color:#9db5c9;margin:0 0 18px}.blAuthCard label{display:block;text-align:left;font-size:12px;font-weight:800;margin:12px 0;color:#c8d8e6}.blAuthCard input{box-sizing:border-box;width:100%;margin-top:6px;padding:14px 15px;border-radius:8px;border:1px solid #36536a;background:#070c11;color:#fff;font-size:16px}.blAuthCard button{width:100%;padding:13px;margin-top:10px;border-radius:8px;font-weight:900;cursor:pointer}.blPrimary{border:1px solid #159fff;background:linear-gradient(90deg,#087fd0,#13b8ff);color:#fff}.blSecondary{border:1px solid #344653;background:#141c23;color:#fff}.blTextBtn{border:0!important;background:transparent!important;color:#28aaff!important}.blAuthMessage{min-height:20px;margin-top:12px;color:#5be69a;font-size:13px}.blAuthMessage.bad{color:#ff6969}.blLoginTag{margin-top:16px;color:#18a9ff;font-size:12px;font-weight:900;letter-spacing:4px}.blLicenseBadge{border:1px solid #1c9b62;color:#55e99d;background:#0b2b1d;padding:8px 10px;border-radius:8px;font-size:11px;font-weight:900}.hidden{display:none!important}
