/* My EP styles extracted from base.css. */
.ep133-device-stats{display:grid;grid-template-columns:1fr 1fr auto;gap:6px}
.ep133-device-stats>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:5px 7px;border:2px inset var(--win-dark);background:#fff;min-width:0}
.ep133-device-stats span{font-size:10px;font-weight:bold;color:#555;white-space:nowrap}
.ep133-device-stats strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ep133-device-stats .ep133-midi-activity{gap:7px;justify-content:center;min-width:58px}
.ep133-device-stats .ep133-memory-stat{flex-wrap:wrap}
.ep133-memory-stat>span,.ep133-memory-stat>strong{align-self:baseline}
.ep133-memory-meter{flex:0 0 100%;height:5px;border:1px solid #555;background:#fff;overflow:hidden}
.ep133-memory-meter>span{display:block;width:0;height:100%;background:var(--primary-blue);transition:width .18s linear}
.ep133-midi-activity strong{opacity:.35}
.ep133-midi-activity strong.active{opacity:1;animation:ep133-midi-pulse .25s ease-in-out infinite}
#ep133-rx-indicator.active{animation-duration:275ms}
@keyframes ep133-midi-pulse{0%,100%{opacity:1}50%{opacity:.25}}
/* My EP — consolidated Win95/CRT UI */
.ep133-browser{display:none;position:static;width:0;height:0;pointer-events:none}
.ep133-browser-window{
  position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);
  z-index:10001;pointer-events:auto;width:min(760px,96vw);max-height:min(680px,92vh);
  background:var(--win-gray);
  border:2px solid;border-top-color:var(--win-light);border-left-color:var(--win-light);
  border-right-color:var(--win-dark);border-bottom-color:var(--win-dark);
  box-shadow:5px 5px 15px rgba(0,0,0,.65);
  display:flex;flex-direction:column;
}
.ep133-browser-window .title-bar{touch-action:none;cursor:move}
.ep133-browser-body{padding:9px;min-height:0;display:flex;flex-direction:column;gap:8px;overflow:auto}
.ep133-browser.busy .ep133-view-tabs button{pointer-events:none;color:#666}
.ep133-browser.busy .ep133-device-head{cursor:progress}

.ep133-device-head{display:flex;align-items:center;justify-content:space-between;gap:8px;border:2px inset var(--win-dark);background:#fff;padding:7px}
.ep133-device-head>div:first-child{display:flex;flex-direction:column;gap:3px;min-width:0}
.ep133-device-head strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ep133-device-head span{font-size:11px}
.ep133-safety{font-size:10px;color:#555}

.my-ep-icon{left:112px}
.my-ep-icon i{font-size:31px}
.my-ep-icon:hover{background:rgba(255,255,255,.2)}
.my-ep-window{width:min(760px,96vw);max-height:min(680px,92vh)}

.ep133-view-tabs{display:flex;gap:3px;padding:0 2px}
.ep133-view-tabs button{min-height:29px;padding:4px 10px;background:var(--win-gray);border:2px outset var(--win-gray);font:700 11px "Courier New",monospace;cursor:pointer}
.ep133-view-tabs button.selected{border-style:inset;background:#fff}
.ep133-view-panel[hidden]{display:none!important}

.ep133-file-browser{min-height:0;flex:1;border:2px inset var(--win-dark);background:#fff;display:flex;flex-direction:column}
.ep133-file-toolbar{display:flex;gap:7px;align-items:stretch;border-bottom:1px solid #aaa;background:var(--win-gray)}
.ep133-file-browser-title{flex:1;min-width:0;padding:5px 7px;font-weight:bold;border-bottom:1px solid #aaa;background:var(--win-gray)}
.ep133-file-browser-title span{font-weight:normal;color:#555}
.ep133-file-tools{display:flex;gap:4px;padding:3px}
.ep133-file-tools input,.ep133-file-tools select{min-height:27px;border:2px inset var(--win-dark);background:#fff;font:12px "Courier New",monospace;padding:3px 5px}
.ep133-file-tools input{width:170px}
.ep133-breadcrumbs{min-height:30px;display:flex;align-items:center;gap:2px;flex-wrap:wrap;padding:3px 5px;background:#fff;border-bottom:1px solid #aaa;font-size:11px}
.ep133-breadcrumb{border:0;background:transparent;padding:3px 4px;font:11px "Courier New",monospace;cursor:pointer;color:#000}
.ep133-breadcrumb:hover{background:var(--primary-blue);color:#fff}
.ep133-file-list{height:270px;max-height:none;min-height:120px;overflow:auto;padding:3px}
.ep133-file-row{
  width:100%;display:grid;grid-template-columns:42px minmax(0,1fr) 90px;gap:7px;align-items:center;
  padding:5px 6px;border:0;border-bottom:1px solid #eee;background:#fff;color:#000;text-align:left;
  font:12px "Courier New",monospace;cursor:pointer;
}
.ep133-file-row:hover{background:#dbe8ff}
.ep133-file-row.selected{background:var(--primary-blue);color:#fff}
.ep133-file-row.selected .ep133-file-type{color:#fff}
.ep133-file-type{font-size:10px;color:#555}
.ep133-file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ep133-file-size{text-align:right}
.ep133-up-row{color:#555}
.ep133-empty{padding:18px 8px;color:#666;text-align:center}
.ep133-file-actions{display:flex;gap:5px;padding:5px;background:var(--win-gray);border-top:1px solid #aaa}
.ep133-file-actions button{min-height:29px;min-width:100px;padding:4px 8px;background:var(--win-gray);border:2px outset var(--win-gray);font:11px "Courier New",monospace;cursor:pointer}
.ep133-file-actions button:disabled{color:#666;cursor:default}
.ep133-file-actions button:active:not(:disabled){border-style:inset}
.ep133-file-row.dragover{outline:2px dashed #000;outline-offset:-3px;background:#c0c0c0}

.ep133-info{min-height:72px;max-height:150px;overflow:auto;overflow-wrap:anywhere;word-break:break-word;padding:6px 8px;border:2px inset var(--win-dark);background:#fff;font-size:11px;line-height:1.55}
.ep133-info b{display:inline-block;min-width:55px}
.ep133-info-empty{color:#666}

.ep133-sample-memory{min-height:0;flex:1;border:2px inset var(--win-dark);background:#fff;display:flex;flex-direction:column}
.ep133-sample-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 7px;border-bottom:1px solid #aaa;background:var(--win-gray)}
.ep133-sample-header>div{display:flex;align-items:baseline;gap:8px}
.ep133-sample-header span{font-size:10px;color:#555}
.ep133-sample-header input{width:190px;min-height:27px;border:2px inset var(--win-dark);background:#fff;font:12px "Courier New",monospace;padding:3px 5px}
.ep133-library-hint{padding:5px 7px;border:2px inset var(--win-dark);background:#fff;font:10px "Courier New",monospace;line-height:1.35;color:#333}
.ep133-sample-tabs{display:flex;flex-wrap:wrap;gap:2px;padding:3px;background:#fff;border-bottom:1px solid #aaa}
.ep133-sample-tab{min-height:27px;padding:3px 7px;background:var(--win-gray);border:2px outset var(--win-gray);font:11px "Courier New",monospace;cursor:pointer}
.ep133-search-box button:disabled{opacity:.28;cursor:default}
.ep133-sample-list.search-active .ep133-sample-row.search-match:not(.selected):not(.multi-selected){
  box-shadow:inset 3px 0 #000080;
}
.ep133-search-empty{
  padding:14px 8px;
  text-align:center;
  font:700 10px "Courier New",monospace;
  color:#555;
}

.ep133-sample-columns{display:grid;grid-template-columns:46px minmax(0,1fr) 90px;gap:7px;padding:3px 8px;border-bottom:1px solid #aaa;background:#e6e6e6;color:#555;font:700 9px "Courier New",monospace}
.ep133-sample-columns span:last-child{text-align:right}
.ep133-sample-tab.selected{border-style:inset;background:#fff;font-weight:bold}
.ep133-sample-list{flex:1;max-height:none;min-height:160px;overflow:auto;padding:2px}
.ep133-sample-row{width:100%;display:grid;grid-template-columns:46px minmax(0,1fr) 90px;gap:7px;align-items:center;padding:5px 6px;border:0;border-bottom:1px solid #eee;background:#fff;color:#000;text-align:left;font:12px "Courier New",monospace;cursor:pointer;touch-action:none}
.ep133-sample-row:hover{background:#dbe8ff}
.ep133-sample-row.empty{color:#777}
.ep133-sample-row.occupied .ep133-sample-number{color:#222}
/* An occupied selected slot must not keep its dark number on the blue background. */
.ep133-sample-row.occupied.selected .ep133-sample-number{color:#fff}
.ep133-sample-row.multi-selected{background:#dbe8ff}
.ep133-sample-row.selected{background:var(--primary-blue);color:#fff}
.ep133-sample-row.dragover{outline:2px dashed #000;outline-offset:-2px;background:#c0c0c0}
.ep133-sample-row.dragover.drag-blocked{outline-color:#9a0000;background:#f1c7c7;cursor:not-allowed}
.ep133-sample-number{font-weight:bold}
.ep133-sample-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ep133-sample-name-input{min-width:0;width:100%;height:20px;padding:0;border:0;background:transparent;color:inherit;font:inherit;outline:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ep133-sample-name-input[readonly]{cursor:inherit}
.ep133-sample-name-input:not([readonly]){background:#fff;color:#000;outline:1px solid #000;padding:0 2px}
.ep133-sample-size{text-align:right;color:#555}
.ep133-sample-row.operation-pending .ep133-sample-size{color:#777;font-weight:bold}
.ep133-sample-row.operation-preparing .ep133-sample-size,
.ep133-sample-row.operation-decoding .ep133-sample-size,
.ep133-sample-row.operation-resampling .ep133-sample-size,
.ep133-sample-row.operation-encoding .ep133-sample-size,
.ep133-sample-row.operation-ready .ep133-sample-size,
.ep133-sample-row.operation-uploading .ep133-sample-size{color:#c04b00;font-weight:bold}
.ep133-sample-row.operation-failed .ep133-sample-size{color:#b00000;font-weight:bold}
.ep133-sample-row.operation-complete .ep133-sample-size{font-weight:bold}
.ep133-sample-row.selected .ep133-sample-size{color:#fff}
.ep133-slot-info-head{display:flex;justify-content:space-between;gap:8px;margin-bottom:4px}
.ep133-slot-info-head span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ep133-slot-destination{margin-top:5px;padding-top:5px;border-top:1px solid #aaa;font-weight:bold}
.ep133-slot-actions{display:flex;gap:4px;margin-top:6px}
.ep133-slot-actions button{min-height:26px;padding:3px 7px;border:2px outset var(--win-gray);background:var(--win-gray);font:10px "Courier New",monospace;cursor:pointer}
.ep133-slot-actions button:active{border-style:inset}
.ep133-slot-actions button:disabled{cursor:wait;opacity:.6}
.ep133-download-sample{font-weight:bold}

.result-item[draggable="true"]{cursor:grab}
.result-item.dragging{opacity:.55}

@media(max-width:600px){
  .my-ep-icon{left:100px}
  .my-ep-window{width:100%;max-height:94vh}
  .ep133-browser{padding:6px}
  .ep133-browser-window{width:100%;max-height:94vh;left:50%;top:50%}
  .ep133-browser-body{overflow:auto}
  .ep133-device-stats{grid-template-columns:1fr 1fr 1fr}
  .ep133-device-stats>div{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
  .ep133-file-toolbar{flex-direction:column;gap:0}
  .ep133-file-tools{padding:4px}
  .ep133-file-tools input{flex:1;width:auto}
  .ep133-file-tools select{width:90px}
  .ep133-breadcrumbs{min-height:34px}
  .ep133-file-list{height:42vh;min-height:160px}
  .ep133-file-row{grid-template-columns:38px minmax(0,1fr) 70px;font-size:11px}
  .ep133-view-tabs button{flex:1}
  .ep133-sample-header{align-items:stretch;flex-direction:column}
  .ep133-sample-header input{width:100%}
  .ep133-sample-tabs{overflow-x:auto;flex-wrap:nowrap}
  .ep133-sample-tab{flex:0 0 auto}
  .ep133-sample-list{max-height:none;min-height:180px}
  .ep133-sample-row{grid-template-columns:38px minmax(0,1fr) 70px;font-size:11px}
  .ep133-info{max-height:120px}
}


/* My EP: single-window Sample Memory layout */
.ep133-browser-body{
  flex:1;
  min-height:0;
  overflow:hidden;
}
#ep133-files-panel{display:none!important}
#ep133-samples-panel{
  display:flex;
  flex:1;
  min-height:0;
  flex-direction:column;
}
#ep133-sample-tabs{display:flex!important;flex:0 0 auto;flex-wrap:wrap;min-height:32px;overflow-x:auto}
#ep133-samples-panel .ep133-sample-memory{
  flex:1;
  min-height:0;
  overflow:hidden;
}
#ep133-samples-panel .ep133-sample-list{
  flex:1;
  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
@media(max-width:600px){
  .ep133-browser-body{overflow:hidden}
  #ep133-samples-panel .ep133-sample-list{min-height:0}
}

/* My EP reference-aligned device header */
.ep133-device-head{display:flex;align-items:stretch;justify-content:space-between;gap:9px}
.ep133-device-head>div:first-child{min-width:0;display:flex;flex-direction:column;justify-content:center}
.ep133-device-head>div:first-child strong{font-size:15px;line-height:17px}
.ep133-device-head>div:first-child span{font-size:10px;margin-top:3px}
.ep133-device-stats{display:grid;grid-template-columns:minmax(145px,1fr) 92px 58px;gap:6px;min-width:309px}
.ep133-device-stats>div{display:flex;align-items:center;justify-content:space-between;gap:7px;padding:5px 7px;border:2px inset var(--win-dark);background:#fff;min-width:0}
.ep133-device-stats span{font-size:9px;font-weight:bold;color:#555;white-space:nowrap}
.ep133-device-stats strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:620px){.ep133-device-head{flex-direction:column}.ep133-device-stats{grid-template-columns:minmax(0,1fr) 92px 58px;min-width:0}}


/* MY EP — approved sample-memory UX */
.my-ep-window{
  width:min(540px,96vw);
  height:min(620px,92vh);
  max-height:min(620px,92vh);
}
.ep133-browser-body{
  height:100%;
  min-height:0;
  padding:8px;
  gap:6px;
  overflow:hidden;
}
.ep133-device-head{
  position:relative;
  display:flex;
  align-items:stretch;
  justify-content:space-between;
  gap:8px;
  min-height:72px;
  padding:7px;
  border:2px inset var(--win-dark);
  background:#fff;
}
.ep133-device-name{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:center;
  padding:2px 4px;
}
.ep133-device-name strong{
  font-size:16px;
  line-height:18px;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ep133-device-stats{
  flex:0 0 auto;
  min-width:248px;
  display:grid;
  grid-template-columns:minmax(182px,1fr) 58px;
  gap:6px;
}
.ep133-device-stats>div{
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
}
.ep133-device-metrics{
  display:grid!important;
  grid-template-rows:1fr 1fr;
  gap:4px!important;
}
.ep133-device-metrics>div{
  min-width:0;
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  align-items:center;
  gap:5px;
  padding:3px 5px;
  border:2px inset var(--win-dark);
  background:#fff;
}
.ep133-device-metrics span{
  font-size:9px;
  font-weight:700;
  color:#555;
  white-space:nowrap;
}
.ep133-device-metrics strong{
  min-width:0;
  font-size:10px;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ep133-memory-stat{
  position:relative;
  padding-bottom:7px!important;
}
.ep133-memory-meter{
  position:absolute;
  left:5px;
  right:5px;
  bottom:2px;
  height:3px;
  border:1px solid #666;
  background:#fff;
  overflow:hidden;
}
.ep133-memory-meter>span{
  display:block;
  width:0;
  height:100%;
  background:var(--primary-blue);
  transition:width .15s linear;
}
.ep133-midi-activity{
  display:grid!important;
  grid-template-rows:1fr 1fr;
  gap:4px!important;
  padding:3px!important;
  border:2px inset var(--win-dark)!important;
  background:var(--win-gray)!important;
}
.ep133-midi-activity>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:4px;
  padding:0 2px;
  font-size:9px;
  font-weight:700;
}
.ep133-midi-led{
  display:block;
  width:9px;
  height:9px;
  border:1px solid #222;
  border-radius:50%;
  background:#404040;
  box-shadow:inset 1px 1px 1px rgba(255,255,255,.22);
}
.ep133-midi-led.active{
  background:#00a000;
  box-shadow:0 0 5px rgba(0,160,0,.85),inset 1px 1px 1px rgba(255,255,255,.45);
}
#ep133-tx-indicator.active{background:#d00000;box-shadow:0 0 5px rgba(208,0,0,.85),inset 1px 1px 1px rgba(255,255,255,.45)}
.ep133-connection-overlay{
  display:none;
  position:absolute;
  inset:0;
  z-index:3;
  align-items:center;
  justify-content:center;
  background:rgba(192,192,192,.68);
  color:#000;
  font-weight:700;
  font-size:12px;
  letter-spacing:.04em;
  text-align:center;
}
.ep133-device-head.disconnected>.ep133-device-name,
.ep133-device-head.disconnected>.ep133-device-stats{
  opacity:.28;
  filter:grayscale(1);
}
.ep133-device-head.disconnected .ep133-connection-overlay{display:flex}

.ep133-global-progress{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:auto minmax(80px,1fr) 34px;
  align-items:center;
  gap:6px;
  min-height:19px;
  padding:2px 4px;
  border:1px solid #888;
  background:var(--win-gray);
  font:700 9px "Courier New",monospace;
}
.ep133-global-progress[hidden]{display:none!important}
.ep133-global-progress-track{
  height:8px;
  border:2px inset var(--win-dark);
  background:#fff;
  overflow:hidden;
}
.ep133-global-progress-track>span{
  display:block;
  width:0;
  height:100%;
  background:var(--primary-blue);
  transition:width .08s linear;
}
.ep133-global-progress strong{text-align:right;font-size:9px}

#ep133-samples-panel{
  min-height:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
}
.ep133-sample-memory{
  min-height:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  border:2px inset var(--win-dark);
  background:#fff;
}
.ep133-sample-nav{
  flex:0 0 auto;
  display:flex;
  align-items:flex-end;
  gap:4px;
  min-height:32px;
  padding:4px 4px 0;
  border-bottom:1px solid #888;
  background:var(--win-gray);
}
.ep133-sample-tabs{
  --ep-tab-count:10;
  flex:1 1 auto;
  min-width:0;
  display:grid;
  grid-template-columns:repeat(var(--ep-tab-count),minmax(0,1fr));
  gap:1px;
  padding:0;
  border:0;
  background:transparent;
  overflow:visible;
}
.ep133-sample-tab{
  position:relative;
  min-width:0;
  height:24px;
  padding:5px 2px 2px;
  margin:3px 0 0;
  border:2px outset var(--win-gray);
  border-bottom-width:1px;
  background:var(--win-gray);
  font:700 8px "Courier New",monospace;
  line-height:12px;
  cursor:pointer;
  overflow:hidden;
  text-overflow:clip;
  white-space:nowrap;
}
.ep133-sample-tab:before{
  content:"";
  position:absolute;
  left:2px;
  top:-4px;
  width:45%;
  height:5px;
  border:1px solid;
  border-color:var(--win-light) var(--win-dark) transparent var(--win-light);
  background:var(--win-gray);
}
.ep133-sample-tab.selected{
  top:-1px;
  height:26px;
  margin-bottom:-1px;
  background:#fff;
  border-style:outset;
  border-bottom-color:#fff;
  z-index:2;
}
.ep133-sample-tab.selected:before{background:#fff}
/* Hovering a destination tab while dragging only navigates; never drops. */
.ep133-sample-tab.drag-switch-pending{
  outline:2px dashed var(--primary-blue);
  outline-offset:-3px;
  background:#dbe8ff;
}
.ep133-drag-source-parking{
  position:fixed;
  left:-10000px;
  top:0;
  opacity:0;
  pointer-events:none;
  z-index:-1;
}


.ep133-search-box{
  flex:0 0 176px;
  height:25px;
  margin-bottom:2px;
  display:grid;
  grid-template-columns:18px minmax(0,1fr) auto 18px;
  align-items:center;
  border:2px inset var(--win-dark);
  background:#fff;
}
.ep133-search-box i{
  font-size:9px;
  text-align:center;
  color:#444;
}
.ep133-search-box input{
  min-width:0;
  width:100%;
  height:19px;
  padding:1px 2px;
  border:0;
  outline:0;
  background:#fff;
  font:10px "Courier New",monospace;
}
.ep133-search-count{
  min-width:48px;
  padding:0 2px;
  text-align:right;
  white-space:nowrap;
  color:#444;
  font:700 8px "Courier New",monospace;
}
.ep133-search-count[hidden]{display:none!important}
.ep133-search-box button{
  width:16px;
  height:16px;
  min-height:16px;
  padding:0;
  border:0;
  background:transparent;
  font:700 13px Arial;
  cursor:pointer;
  color:#444;
}

.ep133-sample-columns{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 72px 34px 76px;
  gap:0;
  padding:0;
  border:0;
  background:var(--win-gray);
  color:#000;
  font:700 9px "Courier New",monospace;
}
.ep133-sample-columns span{
  min-width:0;
  height:21px;
  padding:4px 4px 2px;
  border:2px outset var(--win-gray);
  overflow:hidden;
  white-space:nowrap;
}
.ep133-sample-columns span:nth-child(3),
.ep133-sample-columns span:nth-child(5){text-align:right}
.ep133-sample-columns span:nth-child(4){text-align:center}

.ep133-sample-list{
  min-height:0;
  flex:1 1 auto;
  max-height:none;
  overflow-y:auto;
  overflow-x:hidden;
  padding:0;
  background:#fff;
}
.ep133-sample-row{
  position:relative;
  width:100%;
  min-height:16px;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 72px 34px 76px;
  gap:0;
  align-items:center;
  padding:0;
  border:0;
  border-bottom:1px solid #e2e2e2;
  background:#fff;
  color:#000;
  text-align:left;
  font:9px "Courier New",monospace;
  user-select:none;
}
.ep133-sample-row:hover:not(.selected):not(.multi-selected):not(.dragover){background:#eef3ff}
.ep133-sample-row.empty{color:#000}
.ep133-sample-row>span,
.ep133-sample-row>.ep133-sample-name-input{
  min-width:0;
}
.ep133-sample-number{
  padding-left:5px;
  font-weight:700;
}
.ep133-sample-name-input{
  width:100%;
  height:15px;
  padding:1px 4px;
  border:0;
  outline:0;
  background:transparent;
  color:inherit;
  font:inherit;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ep133-sample-name-input[readonly]{cursor:inherit}
.ep133-sample-name-input:not([readonly]){
  background:#fff;
  color:#000;
  border:1px solid #000;
  padding:0 3px;
}
.ep133-sample-size,.ep133-sample-rate{
  padding:0 5px;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ep133-sample-channel{
  display:flex;
  justify-content:center;
  align-items:center;
}
.ep133-channel-icon{
  position:relative;
  display:inline-block;
  width:18px;
  height:12px;
}
.ep133-channel-icon:before,
.ep133-channel-icon:after{
  content:"";
  position:absolute;
  top:1px;
  width:9px;
  height:9px;
  border:1px solid currentColor;
  border-radius:50%;
}
.ep133-channel-icon.mono:before{left:4px}
.ep133-channel-icon.mono:after{display:none}
.ep133-channel-icon.stereo:before{left:1px}
.ep133-channel-icon.stereo:after{left:7px}
.ep133-sample-row.multi-selected{
  background:#c8d8f0;
  color:#000;
}
.ep133-sample-row.selected{
  background:var(--primary-blue);
  color:#fff;
}
.ep133-sample-row.selected .ep133-sample-name-input{color:#fff}
/* The selected row stays blue, but its editable name field is white with dark text. */
.ep133-sample-row.selected .ep133-sample-name-input:not([readonly]){color:#000}
.ep133-sample-row.search-match:not(.selected):not(.multi-selected){
  box-shadow:inset 3px 0 #000080;
  background:#f0f2ff;
}
.ep133-sample-row.dragging{opacity:.42}
.ep133-sample-row.dragover{
  background:var(--primary-blue)!important;
  color:#fff!important;
  outline:0;
}
.ep133-sample-row.dragover .ep133-sample-name-input{color:#fff}
/* Show the exact operation at the destination before releasing the pointer. */
.ep133-sample-row.dragover[data-transfer-label]::after{
  content:attr(data-transfer-label);
  position:absolute;
  top:0;
  right:81px;
  z-index:2;
  padding:1px 5px;
  background:#fff;
  color:#000;
  border:1px solid #222;
  font:700 9px/12px "Courier New",monospace;
  pointer-events:none;
}
.ep133-sample-row.dragover.drag-blocked{background:#f1c7c7!important;color:#620000!important}
.ep133-sample-row.dragover.drag-blocked .ep133-sample-name-input{color:#620000}
@keyframes ep133-preview-name{
  0%,45%,100%{filter:none}
  55%,90%{background:#000;color:#fff}
}
.ep133-sample-row.previewing .ep133-sample-name-input{
  animation:ep133-preview-name .72s steps(1,end) infinite;
}
.ep133-row-actions{
  position:absolute;
  right:2px;
  top:0;
  display:flex;
  gap:2px;
  padding-left:3px;
  background:var(--primary-blue);
}
.ep133-row-actions button{
  width:16px;
  height:16px;
  min-height:16px;
  padding:0;
  border:2px outset var(--win-gray);
  background:var(--win-gray);
  color:#000;
  font:700 10px "Courier New",monospace;
  cursor:pointer;
}
.ep133-row-actions button:active{border-style:inset}
.ep133-row-progress{
  display:block;
  height:7px;
  margin:0 5px;
  border:1px solid currentColor;
  background:#fff;
  overflow:hidden;
}
.ep133-row-progress>span{
  display:block;
  height:100%;
  background:var(--primary-blue);
}
.ep133-sample-row.selected .ep133-row-progress>span{background:#fff}
.ep133-operation-label{
  display:block;
  padding:0 4px;
  font-size:8px;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ep133-properties{
  position:fixed;
  z-index:10020;
  width:220px;
  max-width:calc(100vw - 16px);
  max-height:calc(100vh - 16px);
  box-sizing:border-box;
  overflow-y:auto;
  padding:3px;
  border:2px outset var(--win-gray);
  background:var(--win-gray);
  box-shadow:3px 3px 0 rgba(0,0,0,.35);
  font:10px "Courier New",monospace;
}
.ep133-properties[hidden]{display:none!important}
.ep133-properties-grid{
  border:2px inset var(--win-dark);
  background:#fff;
}
.ep133-property-row{
  display:grid;
  grid-template-columns:78px minmax(0,1fr);
  min-height:28px;
  align-items:center;
  border-bottom:1px solid #aaa;
}
.ep133-property-row:last-child{border-bottom:0}
.ep133-property-label{
  align-self:stretch;
  display:flex;
  align-items:center;
  padding:4px 5px;
  border-right:1px solid #aaa;
  font-weight:700;
  background:#e9e9e9;
}
.ep133-property-control{
  display:grid;
  grid-template-columns:22px minmax(0,1fr) 22px;
  align-items:center;
  gap:2px;
  padding:2px 3px;
}
.ep133-property-control button{
  width:21px;
  height:21px;
  min-height:21px;
  padding:0;
  border:2px outset var(--win-gray);
  background:var(--win-gray);
  font:700 10px "Courier New",monospace;
  cursor:pointer;
}
.ep133-property-control button:active{border-style:inset}
.ep133-prop-value{
  min-width:0;
  text-align:center;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ep133-prop-value[data-drag="bpm"]{cursor:ns-resize}
.ep133-property-row.pending .ep133-prop-value{
  opacity:.38;
}
.ep133-properties-scope,.ep133-properties-status{
  padding:5px;
  border-top:1px solid #aaa;
  font:700 9px "Courier New",monospace;
  overflow-wrap:anywhere;
}
.ep-pad-readonly-dialog{position:fixed;inset:0;z-index:10035;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(0,0,0,.5)}
.ep-pad-readonly-dialog[hidden]{display:none!important}
.ep-pad-readonly-window{width:min(690px,96vw);max-height:92vh;overflow:auto;background:var(--win-gray);border:2px outset var(--win-gray);font:12px "Courier New",monospace}
.ep-pad-readonly-body{padding:10px;display:flex;flex-direction:column;gap:10px}
.ep-pad-readonly-selectors{display:flex;flex-wrap:wrap;gap:10px}
.ep-pad-readonly-selectors label{display:flex;flex-direction:column;gap:4px}
.ep-pad-readonly-selectors select{min-width:100px}
.ep-pad-readonly-body pre{white-space:pre-wrap;overflow-wrap:anywhere}
.ep-pad-readonly-body dl{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.ep-pad-readonly-body dd{margin:0}
.ep-pad-keys{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;
  padding:12px;background:#c5c4bd;border:2px inset #d9d9d2;border-radius:3px}
.ep-pad-key{position:relative;min-height:79px;display:flex;flex-direction:column;
  align-items:flex-start;justify-content:space-between;gap:5px;padding:9px 11px;
  color:#f6f5f2;background:#191b1c;border:2px outset #343637;border-radius:5px;
  font:700 11px "Courier New",monospace;cursor:pointer;text-align:left;
  box-shadow:0 2px 1px #777}
.ep-pad-key-legend{font:700 clamp(18px,3vw,24px) "Courier New",monospace}
.ep-pad-key-number{font-size:10px;color:#e9e9e9}
.ep-pad-key-sample{font-size:9px;color:#ffae85;overflow-wrap:anywhere}
.ep-pad-key.is-selected{border-color:#ed5833;box-shadow:inset 0 0 0 2px #ec6645,0 2px 1px #777}
.ep-pad-key:focus-visible{outline:3px solid #ff6638;outline-offset:2px}
.ep-pad-key:disabled{opacity:.43;cursor:not-allowed}
@media(max-width:440px){.ep-pad-keys{padding:6px;gap:5px}
  .ep-pad-key{min-height:74px;padding:7px 6px}
  .ep-pad-key-sample{font-size:8px}}
.ep133-property-separator{
  height:2px;
  background:var(--win-gray);
  border-top:1px solid #777;
  border-bottom:1px solid #fff;
}

.ep133-confirm-dialog{
  position:fixed;
  inset:0;
  z-index:10060;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
  background:rgba(0,0,0,.28);
}
.ep133-confirm-dialog[hidden]{display:none!important}
.ep133-confirm-window{
  width:min(330px,calc(100vw - 24px));
  max-height:calc(100vh - 24px);
  overflow-y:auto;
  background:var(--win-gray);
  border:2px outset var(--win-gray);
  box-shadow:5px 5px 12px rgba(0,0,0,.5);
}
.ep133-confirm-body{padding:12px}
.ep133-confirm-message{
  min-height:48px;
  display:flex;
  align-items:center;
  gap:10px;
  font:12px "Courier New",monospace;
  font-weight:700;
}
.ep133-confirm-actions{
  display:flex;
  justify-content:flex-end;
  gap:6px;
  margin-top:10px;
}
.ep133-confirm-actions button{
  min-width:72px;
  min-height:28px;
  padding:3px 8px;
  border:2px outset var(--win-gray);
  background:var(--win-gray);
  font:11px "Courier New",monospace;
  cursor:pointer;
}
.ep133-confirm-actions button:active{border-style:inset}

.ep133-upload-choice-dialog{z-index:10080}
.ep133-upload-choice-window{width:min(550px,calc(100vw - 24px));padding:10px}
.ep133-upload-choice-window>strong{display:block;font:700 13px "Courier New",monospace;padding:5px}
.ep133-upload-choice-window p{font:12px/1.4 "Courier New",monospace;margin:0 0 10px}
.ep133-upload-choice-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:180px;overflow:auto;background:#fff;padding:10px;border:2px inset #ccc;font:11px/1.5 "Courier New",monospace}
.ep133-upload-choice-warning{color:#7d1e1e;font-weight:bold!important}
.ep133-upload-choice-actions{flex-wrap:wrap;gap:7px}
.ep133-upload-choice-actions button{white-space:normal;min-width:110px}
.ep133-upload-choice-actions button[disabled]{opacity:.45;cursor:not-allowed}
.ep133-upload-choice-actions button:focus-visible{outline:3px solid #152fa0;outline-offset:2px}

.ep133-visually-hidden{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

@media(max-width:620px){
  .my-ep-window{width:96vw;height:92vh;max-height:92vh}
  .ep133-device-head{flex-direction:row}
  .ep133-device-stats{min-width:230px;grid-template-columns:minmax(164px,1fr) 58px}
  .ep133-sample-tab{font-size:7px;padding-left:1px;padding-right:1px}
  .ep133-search-box{flex-basis:100px}
  .ep133-sample-columns,.ep133-sample-row{grid-template-columns:38px minmax(0,1fr) 62px 30px 66px}
}

.ep133-browser.device-disconnected #ep133-samples-panel{
  opacity:.38;
  filter:grayscale(1);
  pointer-events:none;
}

/* ZAT-78: local diagnostic export, independent of device mutation controls. */
.ep133-diagnostics-actions{display:flex;align-items:center;margin-left:auto;flex:0 0 auto}
.ep133-browser-window .title-bar .ep133-diagnostics-export{width:auto;height:22px;min-height:22px;margin-left:4px;padding:2px 7px;white-space:nowrap;background:var(--win-gray,#c0c0c0);border:2px outset var(--win-gray,#c0c0c0);font:700 10px "Courier New",monospace;cursor:pointer}
.ep133-diagnostics-export:focus-visible{outline:3px solid #152fa0;outline-offset:2px}
.ep133-diagnostics-export:disabled{opacity:.5;cursor:wait}
