/* Size every part of the damage popup from its available tableau space. */
#commander-table[data-screen=tracker] .ct-player-dialog:has(#ct-assign-damage){
  --damage-gap:clamp(3px,calc(var(--menu-height)*.025),7px);
  display:grid;
  grid-template-rows:max-content max-content minmax(0,1fr);
  gap:var(--damage-gap);
  padding:clamp(6px,calc(var(--menu-height)*.04),12px);
  overflow:hidden;
}
#commander-table[data-screen=tracker] .ct-player-dialog:has(#ct-assign-damage)>h3{
  margin:0 22px;
  font-size:clamp(11px,calc(var(--menu-height)*.075),18px);
  line-height:1.15;
}
#commander-table[data-screen=tracker] .ct-player-dialog:has(#ct-assign-damage)>p{
  margin:0 22px;
  font-size:clamp(10px,calc(var(--menu-height)*.06),14px);
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#commander-table[data-screen=tracker] .ct-player-dialog:has(#ct-assign-damage)>.ct-close{
  top:5px;
  right:5px;
  width:26px;
  min-width:26px;
  height:26px;
  min-height:26px;
  border-radius:8px;
}
#commander-table .ct-player-dialog #ct-assign-damage{
  display:grid;
  grid-template-rows:minmax(0,1fr) max-content;
  align-items:stretch;
  justify-items:center;
  gap:var(--damage-gap);
  min-width:0;
  width:100%;
  margin:0;
}
#commander-table #ct-assign-damage .ct-damage-wheels{
  width:min(100%,360px);
  height:100%;
  max-height:none;
  gap:10px;
}
#commander-table #ct-assign-damage .ct-damage-wheel-column{
  flex:0 0 calc((100% - 10px)/2);
  grid-template-rows:max-content minmax(0,1fr);
  gap:4px;
}
#commander-table #ct-assign-damage .ct-damage-wheel-column h4{
  font-size:clamp(10px,calc(var(--menu-height)*.06),14px);
  line-height:1.2;
  max-height:1.2em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#commander-table #ct-assign-damage .ct-damage-wheel{
  container-type:size;
  display:grid;
  grid-template-rows:minmax(0,1fr) minmax(0,3fr) minmax(0,1fr);
  justify-items:center;
  align-items:center;
  min-height:0;
  max-height:none;
  padding:0;
  background:rgba(17,26,74,.35);
  border:1px solid #929ab477;
  border-radius:10px;
  gap:0;
}
#commander-table #ct-assign-damage .ct-damage-wheel>output{
  font-size:min(64px,55cqh)!important;
  line-height:1;
}
#commander-table #ct-assign-damage .ct-damage-wheel>span{
  font-size:min(16px,18cqh);
  min-height:0;
  height:1em;
  line-height:1;
}
#commander-table #ct-assign-damage>button{
  width:min(100%,360px);
  min-height:clamp(26px,calc(var(--menu-height)*.14),36px);
  padding:4px 8px;
  font-size:clamp(11px,calc(var(--menu-height)*.065),15px);
  line-height:1.15;
  border-radius:9px;
}
